Skip to content

Commit 7c64d5d

Browse files
authored
Do not call python directly but use sys.executable. Fixes #5872 (#5873)
Do not call python directly but use sys.executable. Fixes #5872
2 parents 018edf2 + 04c01fb commit 7c64d5d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

testing/test_parseopt.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,11 @@ def test_argcomplete(testdir, monkeypatch):
298298
# redirect output from argcomplete to stdin and stderr is not trivial
299299
# http://stackoverflow.com/q/12589419/1307905
300300
# so we use bash
301-
fp.write('COMP_WORDBREAKS="$COMP_WORDBREAKS" python -m pytest 8>&1 9>&2')
301+
fp.write(
302+
'COMP_WORDBREAKS="$COMP_WORDBREAKS" {} -m pytest 8>&1 9>&2'.format(
303+
sys.executable
304+
)
305+
)
302306
# alternative would be exteneded Testdir.{run(),_run(),popen()} to be able
303307
# to handle a keyword argument env that replaces os.environ in popen or
304308
# extends the copy, advantage: could not forget to restore

0 commit comments

Comments
 (0)