Issue #17041: Fix doctesting when Python is configured with the

--without-doc-strings.
This commit is contained in:
Serhiy Storchaka 2013-01-31 16:11:04 +02:00
parent f9fcdb7e90
commit 9a11f17673
2 changed files with 4 additions and 2 deletions

View file

@ -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)