mirror of
https://github.com/python/cpython.git
synced 2025-07-29 14:15:07 +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
|
@ -219,6 +219,8 @@ def print_diffs(text1, text2):
|
|||
|
||||
class PyDocDocTest(unittest.TestCase):
|
||||
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
def test_html_doc(self):
|
||||
result, doc_loc = get_pydoc_html(pydoc_mod)
|
||||
mod_file = inspect.getabsfile(pydoc_mod)
|
||||
|
@ -232,6 +234,8 @@ class PyDocDocTest(unittest.TestCase):
|
|||
print_diffs(expected_html, result)
|
||||
self.fail("outputs are not equal, see diff above")
|
||||
|
||||
@unittest.skipIf(sys.flags.optimize >= 2,
|
||||
"Docstrings are omitted with -O2 and above")
|
||||
def test_text_doc(self):
|
||||
result, doc_loc = get_pydoc_text(pydoc_mod)
|
||||
expected_text = expected_text_pattern % \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue