summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r--Lib/test/test_pydoc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index 5bb97e2..6cfe7e7 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -399,6 +399,8 @@ foo = 1
synopsis = pydoc.synopsis(init_path, {})
self.assertEqual(synopsis, 'my doc')
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ 'Docstrings are omitted with -OO and above')
def test_synopsis_sourceless_empty_doc(self):
with test.test_support.temp_cwd() as test_dir:
init_path = os.path.join(test_dir, 'foomod42.py')