Skip to content

Commit 59247fa

Browse files
gui tests added
1 parent 098536b commit 59247fa

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/test_entry_points.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,20 @@ def test_run_pica_main(mock_freeze_support, mock_set_start_method, mock_pica_lau
4545
mock_tk_tk.assert_called_once()
4646
mock_pica_launcher_app.assert_called_once_with(mock_root)
4747
mock_root.mainloop.assert_called_once()
48+
49+
import run_pica
50+
51+
def test_run_pica_script():
52+
"""
53+
Tests that run_pica.py correctly initializes the main GUI.
54+
We mock the GUI main loop so the test doesn't hang.
55+
"""
56+
with patch("pica.main.main") as mock_main:
57+
# Simulate running the script logic
58+
# If run_pica.py has a main() function, call it.
59+
# If it runs on import, verify the mock was called.
60+
if hasattr(run_pica, 'main'):
61+
run_pica.main()
62+
63+
# Verify it attempted to start the PICA GUI
64+
mock_main.assert_called_once()

0 commit comments

Comments
 (0)