Skip to content

Commit 19c9e53

Browse files
committed
Make sure to quote sys.executable as we're running a shell
1 parent c28b631 commit 19c9e53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

testing/test_parseopt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import argparse
22
import distutils.spawn
33
import os
4+
import shlex
45
import sys
56

67
import py
@@ -300,7 +301,7 @@ def test_argcomplete(testdir, monkeypatch):
300301
# so we use bash
301302
fp.write(
302303
'COMP_WORDBREAKS="$COMP_WORDBREAKS" {} -m pytest 8>&1 9>&2'.format(
303-
sys.executable
304+
shlex.quote(sys.executable)
304305
)
305306
)
306307
# alternative would be exteneded Testdir.{run(),_run(),popen()} to be able

0 commit comments

Comments
 (0)