Skip to content

Commit cb00a29

Browse files
committed
test_matrix: Run Python subprocess via sys.executable.
This works better with pytest on Windows. Signed-off-by: Anders Kaseorg <[email protected]>
1 parent b02b842 commit cb00a29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

zulip/integrations/bridge_with_matrix/test_matrix.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import shutil
3+
import sys
34
from contextlib import contextmanager
45
from subprocess import PIPE, Popen
56
from tempfile import mkdtemp
@@ -41,7 +42,7 @@ def new_temp_dir() -> Iterator[str]:
4142
class MatrixBridgeScriptTests(TestCase):
4243
def output_from_script(self, options: List[str]) -> List[str]:
4344
popen = Popen(
44-
["python", script] + options, stdin=PIPE, stdout=PIPE, universal_newlines=True
45+
[sys.executable, script] + options, stdin=PIPE, stdout=PIPE, universal_newlines=True
4546
)
4647
return popen.communicate()[0].strip().split("\n")
4748

0 commit comments

Comments
 (0)