summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
authorGiampaolo Rodola' <g.rodola@gmail.com>2014-06-21 11:59:25 (GMT)
committerGiampaolo Rodola' <g.rodola@gmail.com>2014-06-21 11:59:25 (GMT)
commit47177861dd7995b4cd27acb9757f0e804e3f06e4 (patch)
tree786e2e6c3ee8790b32123b4c203ca14826036cc2 /Lib/test/test_pydoc.py
parentbd0487694c0ce55ae9d425fe9e13e21878a7d6dc (diff)
parentca7e5d3e1dd2ac82abfa425817180cdc7985d3de (diff)
downloadcpython-47177861dd7995b4cd27acb9757f0e804e3f06e4.zip
cpython-47177861dd7995b4cd27acb9757f0e804e3f06e4.tar.gz
cpython-47177861dd7995b4cd27acb9757f0e804e3f06e4.tar.bz2
merge heads
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r--Lib/test/test_pydoc.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index 542b433..3bce66e 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -402,6 +402,7 @@ class PydocDocTest(unittest.TestCase):
"Docstrings are omitted with -O2 and above")
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
'trace function introduces __locals__ unexpectedly')
+ @requires_docstrings
def test_html_doc(self):
result, doc_loc = get_pydoc_html(pydoc_mod)
mod_file = inspect.getabsfile(pydoc_mod)
@@ -421,6 +422,7 @@ class PydocDocTest(unittest.TestCase):
"Docstrings are omitted with -O2 and above")
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
'trace function introduces __locals__ unexpectedly')
+ @requires_docstrings
def test_text_doc(self):
result, doc_loc = get_pydoc_text(pydoc_mod)
expected_text = expected_text_pattern % (
@@ -495,6 +497,7 @@ class PydocDocTest(unittest.TestCase):
'Docstrings are omitted with -O2 and above')
@unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
'trace function introduces __locals__ unexpectedly')
+ @requires_docstrings
def test_help_output_redirect(self):
# issue 940286, if output is set in Helper, then all output from
# Helper.help should be redirected
@@ -746,7 +749,7 @@ class TestDescriptions(unittest.TestCase):
try:
pydoc.render_doc(name)
except ImportError:
- self.fail('finding the doc of {!r} failed'.format(o))
+ self.fail('finding the doc of {!r} failed'.format(name))
for name in ('notbuiltins', 'strrr', 'strr.translate',
'str.trrrranslate', 'builtins.strrr',