summaryrefslogtreecommitdiffstats
path: root/Lib/test/support
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-01-18 11:15:08 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-01-18 11:15:08 (GMT)
commit9def2843873edde3feec6eaf2ee60c4e48172164 (patch)
tree9a7e862b8677c29fd877d55ea38b37d680087cfd /Lib/test/support
parentc437d0cb4e99bd58ff0150414b5d5f0b26605687 (diff)
downloadcpython-9def2843873edde3feec6eaf2ee60c4e48172164.zip
cpython-9def2843873edde3feec6eaf2ee60c4e48172164.tar.gz
cpython-9def2843873edde3feec6eaf2ee60c4e48172164.tar.bz2
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.
Diffstat (limited to 'Lib/test/support')
-rw-r--r--Lib/test/support/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 2969b36..58dcc8a 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -2053,6 +2053,11 @@ def args_from_interpreter_flags():
settings in sys.flags and sys.warnoptions."""
return subprocess._args_from_interpreter_flags()
+def optim_args_from_interpreter_flags():
+ """Return a list of command-line arguments reproducing the current
+ optimization settings in sys.flags."""
+ return subprocess._optim_args_from_interpreter_flags()
+
#============================================================
# Support for assertions about logging.
#============================================================