test: pin the Sample-alignment motion-watch exception
CI / test (3.11) (pull_request) Successful in 1m12s
CI / test (3.12) (pull_request) Successful in 1m13s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m12s
CI / lint (pull_request) Successful in 1m30s
CI / test (3.13) (pull_request) Successful in 1m25s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m21s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m27s
CI / test-with-coverage (pull_request) Successful in 1m43s
CI / coverage-analysis (pull_request) Successful in 4s
CI / lint (push) Successful in 28s
Docs build and publish / docker (push) Successful in 8s
CI / test (3.11) (push) Canceled after 35s
CI / test (3.12) (push) Canceled after 31s
CI / test (3.13) (push) Canceled after 30s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 26s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 25s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 21s
CI / test-with-coverage (push) Canceled after 20s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 24s
CI / test (3.11) (pull_request) Successful in 1m12s
CI / test (3.12) (pull_request) Successful in 1m13s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m12s
CI / lint (pull_request) Successful in 1m30s
CI / test (3.13) (pull_request) Successful in 1m25s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m21s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m27s
CI / test-with-coverage (pull_request) Successful in 1m43s
CI / coverage-analysis (pull_request) Successful in 4s
CI / lint (push) Successful in 28s
Docs build and publish / docker (push) Successful in 8s
CI / test (3.11) (push) Canceled after 35s
CI / test (3.12) (push) Canceled after 31s
CI / test (3.13) (push) Canceled after 30s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 26s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 25s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 21s
CI / test-with-coverage (push) Canceled after 20s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 24s
Robot motion switches to the combined view; alignment beginning switches straight back while busy is still set, and staying busy in alignment never re-triggers. Piggybacks on the init test's window - extra MainWindow constructions feed the PySide teardown flake. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit was merged in pull request #144.
This commit is contained in:
@@ -14,7 +14,7 @@ def mock_ui_state():
|
||||
yield mock
|
||||
|
||||
|
||||
def test_main_window_init(qtbot, mock_ui_state):
|
||||
def test_main_window_init(qtbot, mock_ui_state, daq_status_factory):
|
||||
with (
|
||||
patch("requests.get") as mock_get,
|
||||
patch("aare.gui.main_window.DAQWorker"),
|
||||
@@ -71,6 +71,25 @@ def test_main_window_init(qtbot, mock_ui_state):
|
||||
win.data_collection._emit_change_energy()
|
||||
assert sent and abs(sent[0] - 12400.0) < 1e-6
|
||||
|
||||
# Motion watch: robot motion switches to the combined beamline view;
|
||||
# alignment beginning switches straight back to the sample camera even
|
||||
# while the busy flag is still set — busy moves during Sample
|
||||
# alignment ARE the alignment, so it never re-triggers the switch.
|
||||
win.update_daq_status(
|
||||
daq_status_factory(state=BeamlineStateEnum.RobotSampleExchange, busy=True)
|
||||
)
|
||||
assert win._watching_motion
|
||||
assert win.video_tab.currentWidget() is win.beamline_combined_panel
|
||||
win.update_daq_status(
|
||||
daq_status_factory(state=BeamlineStateEnum.SampleAlignment, busy=True)
|
||||
)
|
||||
assert not win._watching_motion
|
||||
assert win.video_tab.currentWidget() is win.sample_camera
|
||||
win.update_daq_status(
|
||||
daq_status_factory(state=BeamlineStateEnum.SampleAlignment, busy=True)
|
||||
)
|
||||
assert not win._watching_motion
|
||||
|
||||
|
||||
def test_main_window_mount_view(qtbot, mock_ui_state):
|
||||
with (
|
||||
|
||||
Reference in New Issue
Block a user