Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Lib/test/test_argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -7350,6 +7350,9 @@ def test_module_as_main_without_altering_argv(self):
basename = 'module' + os_helper.FS_NONASCII
modulename = f'{self.dirname}.{basename}'
self.make_script(self.dirname, basename)
# The filesystem encoding may be non-UTF-8,
# but the runner runs in UTF-8 mode
modulename = os.fsencode(modulename).decode("utf-8", "surrogateescape")
Comment thread
encukou marked this conversation as resolved.
runner_source = textwrap.dedent(f'''\
import runpy
runpy._run_module_as_main({modulename!r}, alter_argv=False)
Expand Down
Loading