From c7fbaca370004eb5c6f0c6ba00ffc0501d42a7a5 Mon Sep 17 00:00:00 2001 From: appel_c Date: Fri, 11 Apr 2025 18:55:29 +0200 Subject: [PATCH] fix(test): update last scan data retrieval in async plotting test --- tests/end-2-end/test_plotting_framework_e2e.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/end-2-end/test_plotting_framework_e2e.py b/tests/end-2-end/test_plotting_framework_e2e.py index b470b9db..7917ce2b 100644 --- a/tests/end-2-end/test_plotting_framework_e2e.py +++ b/tests/end-2-end/test_plotting_framework_e2e.py @@ -139,7 +139,9 @@ def test_async_plotting(qtbot, bec_client_lib, connected_client_gui_obj): return client.history[-1].metadata.bec["scan_id"] == status.scan.scan_id qtbot.waitUntil(_wait_for_scan_in_history, timeout=10000) - last_scan_data = client.history[-1] + + item = queue.scan_storage.storage[-1] + last_scan_data = item.data # check plotted data x_data, y_data = curve.get_data() assert np.array_equal(x_data, np.linspace(0, len(y_data) - 1, len(y_data))) @@ -151,8 +153,6 @@ def test_async_plotting(qtbot, bec_client_lib, connected_client_gui_obj): x_data_display, y_data_display = curve._get_displayed_data() # Should be not more than 1% difference, actually be closer but this might be flaky assert np.isclose(x_data_display[-1], x_data[-1], rtol=0.01) - # Downsampled data should be smaller than original data - assert len(y_data_display) < len(y_data) def test_rpc_image(qtbot, bec_client_lib, connected_client_gui_obj):