From 8feb96287749c757c5776e6bfc0fb6a77d2af505 Mon Sep 17 00:00:00 2001 From: appel_c Date: Fri, 5 Dec 2025 14:17:02 +0100 Subject: [PATCH] test(pilatus): Fix on_complete callback for pilatus --- debye_bec/devices/pilatus/pilatus.py | 8 ++++---- tests/tests_devices/test_pilatus.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/debye_bec/devices/pilatus/pilatus.py b/debye_bec/devices/pilatus/pilatus.py index 7dabb0d..eec14c2 100644 --- a/debye_bec/devices/pilatus/pilatus.py +++ b/debye_bec/devices/pilatus/pilatus.py @@ -587,15 +587,15 @@ class Pilatus(PSIDeviceBase, ADBase): scan_msg.scan_name in self.xas_xrd_scan_names or scan_msg.scan_type == "step" ): # TODO how to deal with fly scans? if status.success: - status.device.file_event.put( - file_path=status.device._full_path, # pylint: disable:protected-access + status.obj.file_event.put( + file_path=status.obj._full_path, # pylint: disable:protected-access done=True, successful=True, hinted_h5_entries={"data": "/entry/data/data"}, ) else: - status.device.file_event.put( - file_path=status.device._full_path, # pylint: disable:protected-access + status.obj.file_event.put( + file_path=status.obj._full_path, # pylint: disable:protected-access done=True, successful=False, hinted_h5_entries={"data": "/entry/data/data"}, diff --git a/tests/tests_devices/test_pilatus.py b/tests/tests_devices/test_pilatus.py index 46228e3..6403e94 100644 --- a/tests/tests_devices/test_pilatus.py +++ b/tests/tests_devices/test_pilatus.py @@ -175,7 +175,7 @@ def test_pilatus_on_trigger_cancel_on_stop(pilatus): status.wait(timeout=5) -def test_pilatus_on_complete(pilatus): +def test_pilatus_on_complete(pilatus: Pilatus): """Test the on_complete logic of the Pilatus detector.""" if pilatus.scan_info.msg.scan_name.startswith("xas"):