From a0fcdffda6bf15f5598fb409d825d0984a2cf6ff Mon Sep 17 00:00:00 2001 From: David Perl Date: Tue, 20 Oct 2026 15:54:53 +0200 Subject: [PATCH] fix: remove test for removed timer box --- tests/unit/gui/test_message_box.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/tests/unit/gui/test_message_box.py b/tests/unit/gui/test_message_box.py index 0d440b9e..5d4bb1ad 100644 --- a/tests/unit/gui/test_message_box.py +++ b/tests/unit/gui/test_message_box.py @@ -47,20 +47,3 @@ def test_experiment_hutch_shutter_check_closed_yes(qtbot): with patch("aare.gui.widgets.message_box.reply_box") as mock_reply: mock_reply.return_value = QMessageBox.StandardButton.Yes assert experiment_hutch_shutter_check(None, False) is True - - -def test_ring_current_auto_check_yes(qtbot): - # This one uses a nested event loop, which can be tricky to test. - # We'll mock timer_box to return a box that we can close manually. - with patch("aare.gui.widgets.message_box.timer_box") as mock_timer_box: - box = QMessageBox() - box.setStandardButtons(QMessageBox.StandardButton.Yes) - mock_timer_box.return_value = box - - # We need to close the box after some time to break the loop - from PySide6.QtCore import QTimer - - QTimer.singleShot(100, lambda: box.done(QMessageBox.StandardButton.Yes)) - - res = ring_current_auto_check(None, 50.0, lambda: False) - assert res is True