From f388b0482ef82f09a770756f1dde60bcd3c9abd1 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 | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/tests/unit/gui/test_message_box.py b/tests/unit/gui/test_message_box.py index 0d440b9e..b2b95082 100644 --- a/tests/unit/gui/test_message_box.py +++ b/tests/unit/gui/test_message_box.py @@ -6,7 +6,6 @@ from PySide6.QtWidgets import QMessageBox from aare.gui.widgets.message_box import ( experiment_hutch_shutter_check, reply_box, - ring_current_auto_check, ring_current_low_check, ) @@ -47,20 +46,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