support: fix assert_python_ok() on python 3.3

Python 3.3 doesn't support the -I command line option (isolated mode).
This commit is contained in:
Victor Stinner
2014-12-18 23:44:57 +01:00
parent f89b92aa09
commit 6a73b64fed

View File

@@ -40,7 +40,7 @@ def _assert_python(expected_success, *args, **env_vars):
else:
isolated = not env_vars
cmd_line = [sys.executable, '-X', 'faulthandler']
if isolated:
if isolated and sys.version_info >= (3, 4):
# isolated mode: ignore Python environment variables, ignore user
# site-packages, and don't add the current directory to sys.path
cmd_line.append('-I')