Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca7e5d3

Browse files
committed
Fix test_pydoc failure introduced by cddb17c4975e. Patch by Berker Peksag.
2 parents 120bb11 + 8aa9e42 commit ca7e5d3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_pydoc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ class PydocDocTest(unittest.TestCase):
402402
"Docstrings are omitted with -O2 and above")
403403
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
404404
'trace function introduces __locals__ unexpectedly')
405+
@requires_docstrings
405406
def test_html_doc(self):
406407
result, doc_loc = get_pydoc_html(pydoc_mod)
407408
mod_file = inspect.getabsfile(pydoc_mod)
@@ -421,6 +422,7 @@ def test_html_doc(self):
421422
"Docstrings are omitted with -O2 and above")
422423
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
423424
'trace function introduces __locals__ unexpectedly')
425+
@requires_docstrings
424426
def test_text_doc(self):
425427
result, doc_loc = get_pydoc_text(pydoc_mod)
426428
expected_text = expected_text_pattern % (
@@ -495,6 +497,7 @@ def test_stripid(self):
495497
'Docstrings are omitted with -O2 and above')
496498
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
497499
'trace function introduces __locals__ unexpectedly')
500+
@requires_docstrings
498501
def test_help_output_redirect(self):
499502
# issue 940286, if output is set in Helper, then all output from
500503
# Helper.help should be redirected

0 commit comments

Comments
 (0)