17 lines
382 B
Python
17 lines
382 B
Python
import subprocess
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
def test_main_runs_successfully():
|
|
project_root = Path(__file__).resolve().parents[1]
|
|
result = subprocess.run(
|
|
[sys.executable, "src/main.py"],
|
|
cwd=project_root,
|
|
capture_output=True,
|
|
text=True,
|
|
timeout=10,
|
|
)
|
|
|
|
assert result.returncode == 0, result.stdout + result.stderr
|