diff --git a/test/framework/run.py b/test/framework/run.py index 908a9e9d93..f97d3b240f 100644 --- a/test/framework/run.py +++ b/test/framework/run.py @@ -543,7 +543,7 @@ def test_run_cmd_script(self): """Testing use of run_cmd with shell=False to call external scripts""" py_test_script = os.path.join(self.test_prefix, 'test.py') write_file(py_test_script, '\n'.join([ - '#!/usr/bin/env python', + '#!%s' % sys.executable, 'print("hello")', ])) adjust_permissions(py_test_script, stat.S_IXUSR)