[+] temporal test
This commit is contained in:
16
tests/test_main.py
Normal file
16
tests/test_main.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
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
|
||||||
Reference in New Issue
Block a user