From d577fac02fed11b2b1c44704c04fd111c2fed1d3 Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Tue, 23 Dec 2025 11:41:25 +0100 Subject: [PATCH] test(scan control): avoid strict length comparisons --- tests/end-2-end/test_scan_control_e2e.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/end-2-end/test_scan_control_e2e.py b/tests/end-2-end/test_scan_control_e2e.py index c40c8e87..366851cf 100644 --- a/tests/end-2-end/test_scan_control_e2e.py +++ b/tests/end-2-end/test_scan_control_e2e.py @@ -1,7 +1,5 @@ import time -import pytest - from bec_widgets.utils.widget_io import WidgetIO @@ -24,8 +22,10 @@ def test_scan_control_populate_scans_e2e(scan_control): scan_control.comboBox_scan_selection.itemText(i) for i in range(scan_control.comboBox_scan_selection.count()) ] - assert scan_control.comboBox_scan_selection.count() == len(expected_scans) - assert sorted(items) == sorted(expected_scans) + # Verify that we have at least the expected scans. + # There may be more scans if additional scans are added to the test plugin. + assert scan_control.comboBox_scan_selection.count() >= len(expected_scans) + assert all(scan in items for scan in expected_scans) def test_run_line_scan_with_parameters_e2e(scan_control, bec_client_lib, qtbot):