diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-31 14:11:28 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-31 14:11:28 (GMT) |
commit | 3ff4571af39a120c5837570f64ee561152ae2be8 (patch) | |
tree | 9c6b743014279b6f9592285bd7cadb66fc701f4a /Lib/test/test_genexps.py | |
parent | cc9e5369d37f91daf36df451b797d42630de839f (diff) | |
parent | 9a11f176733b8df1dcdf9e54029937b54d69f5f0 (diff) | |
download | cpython-3ff4571af39a120c5837570f64ee561152ae2be8.zip cpython-3ff4571af39a120c5837570f64ee561152ae2be8.tar.gz cpython-3ff4571af39a120c5837570f64ee561152ae2be8.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.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_genexps.py b/Lib/test/test_genexps.py index 413043c..203b336 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) |