Skip to content

Commit 2d725b4

Browse files
committed
More test fixes for Windows.
1 parent 0ef7841 commit 2d725b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def get_output(
5050
):
5151
# type: (...) -> Text
5252
process = subprocess.Popen(
53-
args=args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kwargs
53+
args=[sys.executable] + args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kwargs
5454
)
5555
output, _ = process.communicate()
5656
decoded_output = output.decode("utf8")
@@ -63,7 +63,7 @@ def assert_version(
6363
expected_version, # type: str
6464
):
6565
# type: (...) -> None
66-
output = get_output(args=[sys.executable] + args + ["--version"])
66+
output = get_output(args=args + ["--version"])
6767
assert expected_version == output.strip()
6868

6969

@@ -88,7 +88,7 @@ def test_conscript(foo_bar_conscript):
8888
if sys.version_info[:2] < (3, 14)
8989
# N.B.: Python 3.14 changed how prog is calculated.
9090
# For zipapps, its `sys.executable <zip>`.
91-
else "python3.{minor} {zipapp}".format(minor=sys.version_info[1], zipapp=foo_bar_conscript)
91+
else "python {zipapp}".format(zipapp=foo_bar_conscript)
9292
)
9393
usage_line = "usage: {argv0} [-h] [-V]".format(argv0=argv0)
9494

@@ -181,7 +181,7 @@ def test_busybox(foo_bar_conscript):
181181
def test_repl(foo_bar_conscript):
182182
# type: (str) -> Any
183183
process = subprocess.Popen(
184-
args=[foo_bar_conscript],
184+
args=[sys.executable, foo_bar_conscript],
185185
stdin=subprocess.PIPE,
186186
stdout=subprocess.PIPE,
187187
stderr=subprocess.STDOUT,

0 commit comments

Comments
 (0)