Skip to content

Commit 27000af

Browse files
authored
Merge pull request #104 from a-detiste/master
python is "python3" on Debian (and others ?)
2 parents a9ef790 + 4265581 commit 27000af

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_cli.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
from typing import Any
23

34
import pysubs2
@@ -49,7 +50,7 @@ def test_srt_to_microdvd() -> None:
4950

5051

5152
def test_srt_to_microdvd_subprocess_pipe() -> None:
52-
cmd = ["python", "-m", "pysubs2", "--to", "microdvd", "--fps", "1000"]
53+
cmd = [sys.executable, "-m", "pysubs2", "--to", "microdvd", "--fps", "1000"]
5354
output = subprocess.check_output(cmd, input=TEST_SRT_FILE, text=True)
5455
assert output.strip() == TEST_MICRODVD_FILE.strip()
5556

@@ -410,7 +411,7 @@ def test_empty_notty_input_doesnt_print_help(capsys: Any, monkeypatch: Any) -> N
410411
with tempfile.TemporaryDirectory() as temp_dir:
411412
path = op.join(temp_dir, "test.srt")
412413
with open(path, "w+") as in_fp:
413-
cmd = ["python", "-m", "pysubs2"]
414+
cmd = [sys.executable, "-m", "pysubs2"]
414415
p = subprocess.run(cmd, stdin=in_fp, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
415416
assert p.returncode == 1
416417
assert not p.stdout.startswith("usage: pysubs2")
@@ -427,7 +428,7 @@ def test_win1250_passthrough_with_surrogateescape() -> None:
427428
with open(input_path, "wb") as fp:
428429
fp.write(input_bytes_win1250)
429430

430-
cmd = ["python", "-m", "pysubs2", "-o", output_dir, input_path]
431+
cmd = [sys.executable, "-m", "pysubs2", "-o", output_dir, input_path]
431432
subprocess.check_call(cmd)
432433

433434
with open(output_path, "rb") as fp:

0 commit comments

Comments
 (0)