Skip to content

Commit 0a49cfb

Browse files
committed
attempt to fix failing test case on windows
1 parent 595b95c commit 0a49cfb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Lib/test/test_pydoc/test_pydoc.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,12 @@ class C(builtins.object)
230230

231231
# output pattern for missing module
232232
def missing_pattern(name, dunder=False):
233+
dunderhelp = "Use help('specialnames') for a list of special names for which help is available.\n" if dunder else ""
233234
return ('''\
234-
No help entry found for %%r.
235-
%%sUse help() to get the interactive help utility.
235+
No help entry found for %r.
236+
%sUse help() to get the interactive help utility.
236237
Use help(str) for help on the str class.
237-
Additional documentation is available online at https://docs.python.org/%s.%s/''' % sys.version_info[:2]).replace('\n', os.linesep) % (name, "Use help('specialnames') for a list of special names for which help is available.\n" if dunder else "")
238+
Additional documentation is available online at https://docs.python.org/%s.%s/''' % (name, dunderhelp, *sys.version_info[:2])).replace('\n', os.linesep)
238239

239240
# output pattern for module with bad imports
240241
badimport_pattern = "problem in %s - ModuleNotFoundError: No module named %r"

0 commit comments

Comments
 (0)