summaryrefslogtreecommitdiff
path: root/Lib/test/test_inspect.py
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-02-23 00:24:49 +0000
committerR. David Murray <rdmurray@bitdance.com>2010-02-23 00:24:49 +0000
commitf28fd24c36310541a1f3ec74e92e8d38629dd5d8 (patch)
treeca85998492ba91f8874ba63fecd77397f65ad3d6 /Lib/test/test_inspect.py
parent87bcb243acfd758b3e91e194bf8f1198ae68a792 (diff)
downloadcpython-git-f28fd24c36310541a1f3ec74e92e8d38629dd5d8.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.py2
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),