From 8ca0e297cf4e34e018dc5770e77dfd3596925f9d Mon Sep 17 00:00:00 2001 From: David Perl Date: Tue, 21 Apr 2026 11:25:49 +0200 Subject: [PATCH] check line scan exists in scans --- tests/unit_tests/test_scan_control.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/unit_tests/test_scan_control.py b/tests/unit_tests/test_scan_control.py index ec2a4d6a..5709bb5b 100644 --- a/tests/unit_tests/test_scan_control.py +++ b/tests/unit_tests/test_scan_control.py @@ -503,6 +503,10 @@ def test_changing_scans_remember_parameters(scan_control, mocked_client): def test_get_scan_parameters_from_redis(qtbot, scan_control: ScanControl, mocked_client): scan_control.comboBox_scan_selection.setCurrentIndex(-1) + assert "line_scan" in [ + scan_control.comboBox_scan_selection.itemText(i) + for i in range(scan_control.comboBox_scan_selection.count()) + ] scan_name = "line_scan" scan_control.comboBox_scan_selection.setCurrentText(scan_name) qtbot.wait(100) @@ -596,6 +600,10 @@ def test_restore_parameters_with_fewer_arg_bundles(scan_control: ScanControl, qt """ # Select the scan type that has history with only one arg bundle scan_control.comboBox_scan_selection.setCurrentIndex(-1) + assert "line_scan" in [ + scan_control.comboBox_scan_selection.itemText(i) + for i in range(scan_control.comboBox_scan_selection.count()) + ] scan_control.current_scan = "line_scan" qtbot.waitUntil(lambda: scan_control.arg_box.count_arg_rows() == 1, timeout=1000)