Skip to content

Commit fa042db

Browse files
QuLogicedschofield
authored andcommitted
Don't hard-code python interpreter path.
1 parent d3ad43f commit fa042db

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

future/tests/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def setUp(self):
130130
standard_library.install_hooks()
131131
from future.builtins import *
132132
""")
133-
self.interpreters = ['python']
133+
self.interpreters = [sys.executable]
134134
self.tempdir = tempfile.mkdtemp() + os.path.sep
135135
self.env = {'PYTHONPATH': os.getcwd()}
136136

@@ -276,13 +276,13 @@ def _futurize_test_script(self, filename='mytestscript.py', stages=(1, 2),
276276
assert stages == [1, 2]
277277
# No extra params needed
278278

279-
output = subprocess.check_output(['python', script] + params +
279+
output = subprocess.check_output([sys.executable, script] + params +
280280
['-w', self.tempdir + filename],
281281
stderr=subprocess.STDOUT)
282282
return output
283283

284284
def _run_test_script(self, filename='mytestscript.py',
285-
interpreter='python'):
285+
interpreter=sys.executable):
286286
env = {'PYTHONPATH': os.getcwd()}
287287
return subprocess.check_output([interpreter, self.tempdir + filename],
288288
env=env)

future/tests/test_standard_library.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
class TestStandardLibraryRenames(CodeHandler):
1919

2020
def setUp(self):
21-
self.interpreter = 'python'
21+
self.interpreter = sys.executable
2222
standard_library.install_hooks()
2323
super(TestStandardLibraryRenames, self).setUp()
2424

0 commit comments

Comments
 (0)