Skip to content

Commit 101fff3

Browse files
committed
update test cases for new message
1 parent 69265aa commit 101fff3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Lib/pydoc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1744,7 +1744,7 @@ def resolve(thing, forceload=0):
17441744
else:
17451745
special = ""
17461746
raise ImportError('''\
1747-
No interactive help entry found for %r.
1747+
No help entry found for %r.
17481748
%sUse help() to get the interactive help utility.
17491749
Use help(str) for help on the str class.
17501750
Additional documentation is available online at https://docs.python.org/%s.%s/''' % (thing, special, *sys.version_info[:2]))

Lib/test/test_pydoc/test_pydoc.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,11 @@ class C(builtins.object)
229229
for s in expected_data_docstrings)
230230

231231
# output pattern for missing module
232-
missing_pattern = '''\
233-
No Python documentation found for %r.
232+
missing_pattern = ('''\
233+
No help entry found for %%r.
234234
Use help() to get the interactive help utility.
235-
Use help(str) for help on the str class.'''.replace('\n', os.linesep)
235+
Use help(str) for help on the str class.
236+
Additional documentation is available online at https://docs.python.org/%s.%s/''' % sys.version_info[:2]).replace('\n', os.linesep)
236237

237238
# output pattern for module with bad imports
238239
badimport_pattern = "problem in %s - ModuleNotFoundError: No module named %r"
@@ -667,7 +668,7 @@ def test_fail_help_cli(self):
667668
elines = (missing_pattern % 'abd').splitlines()
668669
with spawn_python("-c" "help()") as proc:
669670
out, _ = proc.communicate(b"abd")
670-
olines = out.decode().splitlines()[-9:-6]
671+
olines = out.decode().splitlines()[-10:-6]
671672
olines[0] = olines[0].removeprefix('help> ')
672673
self.assertEqual(elines, olines)
673674

0 commit comments

Comments
 (0)