mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
subprocess._optim_args_from_interpreter_flags()
Issue #26100: * Add subprocess._optim_args_from_interpreter_flags() * Add test.support.optim_args_from_interpreter_flags() * Use new functions in distutils, test_cmd_line_script, test_compileall and test_inspect The change enables test_details() test of test_inspect when -O or -OO command line option is used.
This commit is contained in:
parent
c437d0cb4e
commit
9def284387
6 changed files with 35 additions and 18 deletions
|
@ -138,9 +138,8 @@ class CmdLineTest(unittest.TestCase):
|
|||
expected_argv0, expected_path0,
|
||||
expected_package, expected_loader,
|
||||
*cmd_line_switches):
|
||||
if not __debug__:
|
||||
cmd_line_switches += ('-' + 'O' * sys.flags.optimize,)
|
||||
run_args = cmd_line_switches + (script_name,) + tuple(example_args)
|
||||
run_args = [*support.optim_args_from_interpreter_flags(),
|
||||
*cmd_line_switches, script_name, *example_args]
|
||||
rc, out, err = assert_python_ok(*run_args, __isolated=False)
|
||||
self._check_output(script_name, rc, out + err, expected_file,
|
||||
expected_argv0, expected_path0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue