We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb21d5c commit e45a834Copy full SHA for e45a834
tests/test_gui.py
@@ -0,0 +1,22 @@
1
+import subprocess
2
+import sys
3
+import os
4
+
5
+def test_main_runs():
6
+ """Check that main.py launches the GUI and exits without errors."""
7
8
+ main_path = os.path.join(os.path.dirname(__file__), "..", "main.py")
9
+ assert os.path.exists(main_path), f"main.py not found at {main_path}"
10
11
+ env = os.environ.copy()
12
+ env["PYTHONPATH"] = os.path.join(os.path.dirname(__file__), "..")
13
+ env["AUTO_CLOSE_GUI"] = "1" # auto-close GUI after 1 second
14
15
+ result = subprocess.run(
16
+ [sys.executable, main_path],
17
+ capture_output=True,
18
+ text=True,
19
+ env=env
20
+ )
21
22
+ assert result.returncode == 0, f"main.py failed with error:\n{result.stderr}"
0 commit comments