From 9f5dec0a03a52ca7c946a842bd35cafaf41e3b80 Mon Sep 17 00:00:00 2001 From: "R. David Murray" Date: Tue, 23 Feb 2010 00:24:49 +0000 Subject: Issue 6292: for the moment at least, the test suite passes if run with -OO. Tests requiring docstrings are skipped. Patch by Brian Curtin, thanks to Matias Torchinsky for helping review and improve the patch. --- Lib/test/test_inspect.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Lib/test/test_inspect.py') diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py index 451d309922..e607af2de9 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -230,6 +230,8 @@ class TestRetrievingSourceCode(GetSourceBase): self.assertEqual(functions, [('eggs', mod.eggs), ('spam', mod.spam)]) + @unittest.skipIf(sys.flags.optimize >= 2, + "Docstrings are omitted with -O2 and above") def test_getdoc(self): self.assertEqual(inspect.getdoc(mod), 'A module docstring.') self.assertEqual(inspect.getdoc(mod.StupidGit), -- cgit v1.2.1