From: Serhiy Storchaka Date: Sun, 1 Mar 2015 13:31:21 +0000 (+0200) Subject: Fixed pydoc tests when run with -OO. X-Git-Tag: v2.7.10rc1~152 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2b8c00d904bde80a6f1a745a0a06dcb6f4fecf9d;p=thirdparty%2FPython%2Fcpython.git Fixed pydoc tests when run with -OO. --- 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')