diff options
author | R. David Murray <rdmurray@bitdance.com> | 2010-02-23 00:24:49 +0000 |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2010-02-23 00:24:49 +0000 |
commit | 9f5dec0a03a52ca7c946a842bd35cafaf41e3b80 (patch) | |
tree | e32c218f0ab1674fd681020e3cd6e19e30a8dc45 /Lib/test/test_inspect.py | |
parent | 91e623d5ce6173491fcd0925049b56b05cd4da87 (diff) | |
download | cpython-9f5dec0a03a52ca7c946a842bd35cafaf41e3b80.tar.gz |
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.
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r-- | Lib/test/test_inspect.py | 2 |
1 files changed, 2 insertions, 0 deletions
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), |