Issue #17041: Fix doctesting when Python is configured with the
--without-doc-strings.
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 @@
     >>> 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)