]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206)
authorTerry Jan Reedy <tjreedy@udel.edu>
Sat, 12 Sep 2020 06:25:36 +0000 (02:25 -0400)
committerGitHub <noreply@github.com>
Sat, 12 Sep 2020 06:25:36 +0000 (02:25 -0400)
Argument script_exec_args is usually an absolute file name,
but twice has form ['-m', 'module_name'].

Lib/test/test_cmd_line_script.py
Misc/NEWS.d/next/Tests/2020-09-11-19-12-31.bpo-41731.Ivxh4U.rst [new file with mode: 0644]

index 6c8c28f40b564bab5bbc324fb1c76e6b431fe2a2..f10ab40017a338b8095f8471952ed49cf2964569 100644 (file)
@@ -145,7 +145,7 @@ class CmdLineTest(unittest.TestCase):
             *run_args, __isolated=False, __cwd=cwd, **env_vars
         )
         if verbose > 1:
-            print('Output from test script %r:' % script_exec_args)
+            print(f'Output from test script {script_exec_args!r:}')
             print(repr(err))
             print('Expected output: %r' % expected_msg)
         self.assertIn(expected_msg.encode('utf-8'), err)
diff --git a/Misc/NEWS.d/next/Tests/2020-09-11-19-12-31.bpo-41731.Ivxh4U.rst b/Misc/NEWS.d/next/Tests/2020-09-11-19-12-31.bpo-41731.Ivxh4U.rst
new file mode 100644 (file)
index 0000000..e368a60
--- /dev/null
@@ -0,0 +1 @@
+Make test_cmd_line_script pass with option '-vv'.