mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
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.
This commit is contained in:
parent
87bcb243ac
commit
f28fd24c36
19 changed files with 194 additions and 41 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue