Skip to content

Commit e0a58d2

Browse files
committed
black
1 parent 14fdd2a commit e0a58d2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_quickmode_open.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import shutil
12
import subprocess
23
from pathlib import Path
34

@@ -6,9 +7,9 @@ def test_mdbub_can_open_simplemap() -> None:
67
"""Test that 'poetry run mdbub' can open examples/mindmaps/simplemap.md without error."""
78
test_file = Path(__file__).parent.parent / "examples" / "mindmaps" / "simplemap.md"
89
assert test_file.exists(), f"File not found: {test_file}"
9-
import sys
10-
11-
cmd = [sys.executable, "-m", "poetry", "run", "mdbub", str(test_file)]
10+
poetry_bin = shutil.which("poetry")
11+
assert poetry_bin, "Poetry executable not found in PATH"
12+
cmd = [poetry_bin, "run", "mdbub", str(test_file)]
1213
proc = subprocess.Popen(
1314
cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE
1415
)

0 commit comments

Comments
 (0)