fix: remove test for removed timer box
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Failing after 1m7s
CI / test (3.14) (pull_request) Successful in 1m31s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m31s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Failing after 1m31s
CI / test (3.13) (pull_request) Failing after 1m38s
CI / test (3.12) (pull_request) Canceled after 1m42s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Canceled after 1m39s
CI / test-with-coverage (pull_request) Successful in 1m49s
CI / coverage-analysis (pull_request) Canceled after 0s
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Failing after 1m7s
CI / test (3.14) (pull_request) Successful in 1m31s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m31s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Failing after 1m31s
CI / test (3.13) (pull_request) Failing after 1m38s
CI / test (3.12) (pull_request) Canceled after 1m42s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Canceled after 1m39s
CI / test-with-coverage (pull_request) Successful in 1m49s
CI / coverage-analysis (pull_request) Canceled after 0s
This commit is contained in:
1 parent
3184f3f324
commit
a0fcdffda6
1 file changed
-17
@@ -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
|
||||
Reference in new issue
Block a user