summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_genexps.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-31 14:11:04 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-31 14:11:04 (GMT)
commit9a11f176733b8df1dcdf9e54029937b54d69f5f0 (patch)
tree33002ae66c84d1a393649656822227265dfe94a8 /Lib/test/test_genexps.py
parentf9fcdb7e900632a86f157d623189e40c375147ce (diff)
downloadcpython-9a11f176733b8df1dcdf9e54029937b54d69f5f0.zip
cpython-9a11f176733b8df1dcdf9e54029937b54d69f5f0.tar.gz
cpython-9a11f176733b8df1dcdf9e54029937b54d69f5f0.tar.bz2
Issue #17041: Fix doctesting when Python is configured with the
--without-doc-strings.
Diffstat (limited to 'Lib/test/test_genexps.py')
-rw-r--r--Lib/test/test_genexps.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_genexps.py b/Lib/test/test_genexps.py
index 1f46af1..d8eb550 100644
--- a/Lib/test/test_genexps.py
+++ b/Lib/test/test_genexps.py
@@ -221,7 +221,8 @@ Check that generator attributes are present
>>> set(attr for attr in dir(g) if not attr.startswith('__')) >= expected
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)
>>> import types
>>> isinstance(g, types.GeneratorType)