Skip to content

Commit

Permalink
Merge pull request #4309 from boegel/fix_test_run_cmd_script
Browse files Browse the repository at this point in the history
use sys.executable to obtain path to `python` command, rather than assuming that `python` command is available in `$PATH`
  • Loading branch information
ocaisa authored Aug 7, 2023
2 parents 01f1b83 + 78559a3 commit 1d83a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/framework/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1d83a04

Please sign in to comment.