diff options
author | Gregory P. Smith <greg@krypto.org> | 2015-02-04 01:04:31 -0800 |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2015-02-04 01:04:31 -0800 |
commit | ef3e7a803f7e575ce26cb2e4e29e46da2d89c124 (patch) | |
tree | ec9df5664c8029412e3923f694c3bbbbc9434ee6 /Tools/scripts/run_tests.py | |
parent | f97d8cc43c09116bebd4d54b7ef5baf472058de3 (diff) | |
parent | 7c584647e0c2fe3f84299cab3b7941d1595de32f (diff) | |
download | cpython-ef3e7a803f7e575ce26cb2e4e29e46da2d89c124.tar.gz |
Skip some tests that require a subinterpreter launched with -E or -I when the
interpreter under test is being run in an environment that requires the use of
environment variables such as PYTHONHOME in order to function at all.
Adds a test.script_helper.interpreter_requires_environment() function
to be used with @unittest.skipIf on stdlib test methods requiring this.
Diffstat (limited to 'Tools/scripts/run_tests.py')
-rw-r--r-- | Tools/scripts/run_tests.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py index a6c5da35e2..b582e13250 100644 --- a/Tools/scripts/run_tests.py +++ b/Tools/scripts/run_tests.py @@ -33,8 +33,6 @@ def main(regrtest_args): # Allow user-specified interpreter options to override our defaults. args.extend(test.support.args_from_interpreter_flags()) - # Workaround for issue #20355 - os.environ.pop("PYTHONWARNINGS", None) # Workaround for issue #20361 args.extend(['-W', 'error::BytesWarning']) @@ -50,7 +48,11 @@ def main(regrtest_args): args.extend(['-u', 'all,-largefile,-audio,-gui']) args.extend(regrtest_args) print(' '.join(args)) - os.execv(sys.executable, args) + if sys.platform == 'win32': + from subprocess import call + sys.exit(call(args)) + else: + os.execv(sys.executable, args) if __name__ == '__main__': |