fix: remove test for removed timer box
CI / lint (pull_request) Successful in 1m0s
CI / test (3.12) (pull_request) Successful in 1m55s
CI / test (3.13) (pull_request) Successful in 1m49s
CI / test (3.14) (pull_request) Successful in 1m56s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m14s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m11s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m24s
CI / test-with-coverage (pull_request) Successful in 1m34s
CI / coverage-analysis (pull_request) Failing after 3s
Docs build and publish / docker (push) Successful in 2s
CI / coverage-analysis (push) Canceled after 0s
CI / lint (push) Canceled after 1m11s
Build and Publish / release (push) Successful in 1m3s
CI / test (3.12) (push) Canceled after 1m12s
CI / test (3.14) (push) Canceled after 1m13s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 1m9s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 1m9s
CI / test-with-coverage (push) Canceled after 1m10s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 1m11s
CI / test (3.13) (push) Canceled after 1m16s

This commit was merged in pull request #253.
This commit is contained in:
perl_d committed 2026-10-20 15:56:47 +02:00
1 parent 3184f3f324
commit f388b0482e
1 file changed
-18
-18
View File
@@ -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