Run the tests using the current Python executable (#615)
Not whatever "python" might be.
diff --git a/typing_extensions/src_py2/test_typing_extensions.py b/typing_extensions/src_py2/test_typing_extensions.py
index eb5acf3..922d8cd 100644
--- a/typing_extensions/src_py2/test_typing_extensions.py
+++ b/typing_extensions/src_py2/test_typing_extensions.py
@@ -860,7 +860,8 @@
file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
'typing_extensions.py')
try:
- subprocess.check_output('python -OO {}'.format(file_path),
+ subprocess.check_output('{} -OO {}'.format(sys.executable,
+ file_path),
stderr=subprocess.STDOUT,
shell=True)
except subprocess.CalledProcessError:
diff --git a/typing_extensions/src_py3/test_typing_extensions.py b/typing_extensions/src_py3/test_typing_extensions.py
index eb0c64f..815e425 100644
--- a/typing_extensions/src_py3/test_typing_extensions.py
+++ b/typing_extensions/src_py3/test_typing_extensions.py
@@ -1389,7 +1389,8 @@
file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)),
'typing_extensions.py')
try:
- subprocess.check_output('python -OO {}'.format(file_path),
+ subprocess.check_output('{} -OO {}'.format(sys.executable,
+ file_path),
stderr=subprocess.STDOUT,
shell=True)
except subprocess.CalledProcessError: