From 2b8c00d904bde80a6f1a745a0a06dcb6f4fecf9d Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 1 Mar 2015 15:31:21 +0200 Subject: [PATCH] Fixed pydoc tests when run with -OO. --- Lib/test/test_pydoc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index 5bb97e245fb4..6cfe7e785363 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') -- 2.47.3