mirror of
https://github.com/python/cpython.git
synced 2025-11-01 14:11:41 +00:00
Fix test_pydoc failure introduced by 7aa72075d440. Patch by Berker Peksag.
This commit is contained in:
parent
504f5c36ef
commit
57398c31c4
1 changed files with 3 additions and 0 deletions
|
|
@ -402,6 +402,7 @@ class PydocDocTest(unittest.TestCase):
|
||||||
"Docstrings are omitted with -O2 and above")
|
"Docstrings are omitted with -O2 and above")
|
||||||
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
|
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
|
||||||
'trace function introduces __locals__ unexpectedly')
|
'trace function introduces __locals__ unexpectedly')
|
||||||
|
@requires_docstrings
|
||||||
def test_html_doc(self):
|
def test_html_doc(self):
|
||||||
result, doc_loc = get_pydoc_html(pydoc_mod)
|
result, doc_loc = get_pydoc_html(pydoc_mod)
|
||||||
mod_file = inspect.getabsfile(pydoc_mod)
|
mod_file = inspect.getabsfile(pydoc_mod)
|
||||||
|
|
@ -421,6 +422,7 @@ def test_html_doc(self):
|
||||||
"Docstrings are omitted with -O2 and above")
|
"Docstrings are omitted with -O2 and above")
|
||||||
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
|
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
|
||||||
'trace function introduces __locals__ unexpectedly')
|
'trace function introduces __locals__ unexpectedly')
|
||||||
|
@requires_docstrings
|
||||||
def test_text_doc(self):
|
def test_text_doc(self):
|
||||||
result, doc_loc = get_pydoc_text(pydoc_mod)
|
result, doc_loc = get_pydoc_text(pydoc_mod)
|
||||||
expected_text = expected_text_pattern % (
|
expected_text = expected_text_pattern % (
|
||||||
|
|
@ -495,6 +497,7 @@ def test_stripid(self):
|
||||||
'Docstrings are omitted with -O2 and above')
|
'Docstrings are omitted with -O2 and above')
|
||||||
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
|
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
|
||||||
'trace function introduces __locals__ unexpectedly')
|
'trace function introduces __locals__ unexpectedly')
|
||||||
|
@requires_docstrings
|
||||||
def test_help_output_redirect(self):
|
def test_help_output_redirect(self):
|
||||||
# issue 940286, if output is set in Helper, then all output from
|
# issue 940286, if output is set in Helper, then all output from
|
||||||
# Helper.help should be redirected
|
# Helper.help should be redirected
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue