]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixed pydoc tests when run with -OO.
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 1 Mar 2015 13:31:21 +0000 (15:31 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 1 Mar 2015 13:31:21 +0000 (15:31 +0200)
Lib/test/test_pydoc.py

index 5bb97e245fb45249a6e2b80079a0bb689a0e51a2..6cfe7e785363aa1c3b0ae862bc9b009206ddc0e9 100644 (file)
@@ -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')