Commit b0664c7d authored by Serhiy Storchaka's avatar Serhiy Storchaka

Fixed pydoc tests when run with -OO.

parent 3128104f
...@@ -399,6 +399,8 @@ foo = 1 ...@@ -399,6 +399,8 @@ foo = 1
synopsis = pydoc.synopsis(init_path, {}) synopsis = pydoc.synopsis(init_path, {})
self.assertEqual(synopsis, 'my doc') 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): def test_synopsis_sourceless_empty_doc(self):
with test.test_support.temp_cwd() as test_dir: with test.test_support.temp_cwd() as test_dir:
init_path = os.path.join(test_dir, 'foomod42.py') init_path = os.path.join(test_dir, 'foomod42.py')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment