Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d835cf1

Browse files
committed
Fix #9588. Add sys.executable to two shell=True tests.
1 parent 5e7918c commit d835cf1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/test/test_subprocess.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,11 +1113,12 @@ def with_spaces(self, *args, **kwargs):
11131113

11141114
def test_shell_string_with_spaces(self):
11151115
# call() function with string argument with spaces on Windows
1116-
self.with_spaces('"%s" "%s"' % (self.fname, "ab cd"), shell=1)
1116+
self.with_spaces('"%s" "%s" "%s"' % (sys.executable, self.fname,
1117+
"ab cd"), shell=1)
11171118

11181119
def test_shell_sequence_with_spaces(self):
11191120
# call() function with sequence argument with spaces on Windows
1120-
self.with_spaces([self.fname, "ab cd"], shell=1)
1121+
self.with_spaces([sys.executable, self.fname, "ab cd"], shell=1)
11211122

11221123
def test_noshell_string_with_spaces(self):
11231124
# call() function with string argument with spaces on Windows

0 commit comments

Comments
 (0)