summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-02-28 22:42:54 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-02-28 22:42:54 (GMT)
commit1c205518a35939ef555c74d0e2f8954a5e1828e1 (patch)
tree382366737c04762fa5b6c20414c86177d3acec3e /Lib/test/test_pydoc.py
parente92951f8da5747f5fd00c7388d9fd8e811422cb3 (diff)
downloadcpython-1c205518a35939ef555c74d0e2f8954a5e1828e1.zip
cpython-1c205518a35939ef555c74d0e2f8954a5e1828e1.tar.gz
cpython-1c205518a35939ef555c74d0e2f8954a5e1828e1.tar.bz2
Issue #19980: Improved help() for non-recognized strings. help('') now
shows the help on str. help('help') now shows the help on help(). Original patch by Mark Lawrence.
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 e9fed0a..edfdb66 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -256,7 +256,10 @@ expected_html_data_docstrings = tuple(s.replace(' ', '&nbsp;')
for s in expected_data_docstrings)
# output pattern for missing module
-missing_pattern = "no Python documentation found for '%s'"
+missing_pattern = '''\
+No Python documentation found for %r.
+Use help() to get the interactive help utility.
+Use help(str) for help on the str class.'''.replace('\n', os.linesep)
# output pattern for module with bad imports
badimport_pattern = "problem in %s - ImportError: No module named %r"