Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
3ff4571a
Commit
3ff4571a
authored
Jan 31, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Issue #17041: Fix doctesting when Python is configured with the
--without-doc-strings.
parents
cc9e5369
9a11f176
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
Lib/test/test_generators.py
Lib/test/test_generators.py
+2
-1
Lib/test/test_genexps.py
Lib/test/test_genexps.py
+2
-1
No files found.
Lib/test/test_generators.py
View file @
3ff4571a
...
@@ -383,7 +383,8 @@ From the Iterators list, about the types of these things.
...
@@ -383,7 +383,8 @@ From the Iterators list, about the types of these things.
<class 'generator'>
<class 'generator'>
>>> [s for s in dir(i) if not s.startswith('_')]
>>> [s for s in dir(i) if not s.startswith('_')]
['close', 'gi_code', 'gi_frame', 'gi_running', 'send', 'throw']
['close', 'gi_code', 'gi_frame', 'gi_running', 'send', 'throw']
>>> print(i.__next__.__doc__)
>>> from test.support import HAVE_DOCSTRINGS
>>> print(i.__next__.__doc__ if HAVE_DOCSTRINGS else 'x.__next__() <==> next(x)')
x.__next__() <==> next(x)
x.__next__() <==> next(x)
>>> iter(i) is i
>>> iter(i) is i
True
True
...
...
Lib/test/test_genexps.py
View file @
3ff4571a
...
@@ -221,7 +221,8 @@ Check that generator attributes are present
...
@@ -221,7 +221,8 @@ Check that generator attributes are present
>>> set(attr for attr in dir(g) if not attr.startswith('__')) >= expected
>>> set(attr for attr in dir(g) if not attr.startswith('__')) >= expected
True
True
>>> print(g.__next__.__doc__)
>>> from test.support import HAVE_DOCSTRINGS
>>> print(g.__next__.__doc__ if HAVE_DOCSTRINGS else 'x.__next__() <==> next(x)')
x.__next__() <==> next(x)
x.__next__() <==> next(x)
>>> import types
>>> import types
>>> isinstance(g, types.GeneratorType)
>>> isinstance(g, types.GeneratorType)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment