test_matrix: Run Python subprocess via sys.executable.
This works better with pytest on Windows.
MODIFY
zulip/integrations/bridge_with_matrix/test_matrix.py
zulip/integrations/bridge_with_matrix/test_matrix.py
import os
import shutil
+import sys
from contextlib import contextmanager
from subprocess import PIPE, Popen
from tempfile import mkdtemp
@@ -41,7 +42,7 @@ def new_temp_dir() -> Iterator[str]:
class MatrixBridgeScriptTests(TestCase):
def output_from_script(self, options: List[str]) -> List[str]:
popen = Popen(
- ["python", script] + options, stdin=PIPE, stdout=PIPE, universal_newlines=True
+ [sys.executable, script] + options, stdin=PIPE, stdout=PIPE, universal_newlines=True
)
return popen.communicate()[0].strip().split("\n")

test_matrix: Run Python subprocess via sys.executable.

This works better with pytest on Windows.

Signed-off-by: Anders Kaseorg <anders@zulip.com>