From 21e3a196a89da9801239ce76fce395059f04efb4 Mon Sep 17 00:00:00 2001 From: jennmald Date: Mon, 25 Nov 2024 12:48:58 -0500 Subject: [PATCH] more fixes after running tests --- src/ophyd_async/epics/adaravis/_aravis_controller.py | 2 +- src/ophyd_async/epics/adpilatus/_pilatus_controller.py | 8 ++++---- src/ophyd_async/plan_stubs/_fly.py | 2 +- tests/core/test_device_save_loader.py | 4 ++-- tests/epics/signal/test_signals.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ophyd_async/epics/adaravis/_aravis_controller.py b/src/ophyd_async/epics/adaravis/_aravis_controller.py index 7c79b4b955..2137785ddd 100644 --- a/src/ophyd_async/epics/adaravis/_aravis_controller.py +++ b/src/ophyd_async/epics/adaravis/_aravis_controller.py @@ -71,7 +71,7 @@ def _get_trigger_info( if trigger == DetectorTrigger.INTERNAL: return AravisTriggerMode.OFF, AravisTriggerSource.FREERUN else: - return (AravisTriggerMode.on, f"Line{self.gpio_number}") # type: ignore + return (AravisTriggerMode.ON, f"Line{self.gpio_number}") # type: ignore async def disarm(self): await adcore.stop_busy_record(self._drv.acquire, False, timeout=1) diff --git a/src/ophyd_async/epics/adpilatus/_pilatus_controller.py b/src/ophyd_async/epics/adpilatus/_pilatus_controller.py index 89a47914f4..46966357b8 100644 --- a/src/ophyd_async/epics/adpilatus/_pilatus_controller.py +++ b/src/ophyd_async/epics/adpilatus/_pilatus_controller.py @@ -15,9 +15,9 @@ class PilatusController(DetectorController): _supported_trigger_types = { - DetectorTrigger.internal: PilatusTriggerMode.internal, - DetectorTrigger.constant_gate: PilatusTriggerMode.ext_enable, - DetectorTrigger.variable_gate: PilatusTriggerMode.ext_enable, + DetectorTrigger.INTERNAL: PilatusTriggerMode.INTERNAL, + DetectorTrigger.CONSTANT_GATE: PilatusTriggerMode.EXT_ENABLE, + DetectorTrigger.VARIABLE_GATE: PilatusTriggerMode.EXT_ENABLE, } def __init__( @@ -44,7 +44,7 @@ async def prepare(self, trigger_info: TriggerInfo): if trigger_info.total_number_of_triggers == 0 else trigger_info.total_number_of_triggers ), - self._drv.image_mode.set(adcore.ImageMode.multiple), + self._drv.image_mode.set(adcore.ImageMode.MULTIPLE), ) async def arm(self): diff --git a/src/ophyd_async/plan_stubs/_fly.py b/src/ophyd_async/plan_stubs/_fly.py index d2e757681e..c4f2e81a2a 100644 --- a/src/ophyd_async/plan_stubs/_fly.py +++ b/src/ophyd_async/plan_stubs/_fly.py @@ -62,7 +62,7 @@ def prepare_static_seq_table_flyer_and_detectors_with_same_trigger( trigger_info = TriggerInfo( number_of_triggers=number_of_frames * repeats, - trigger=DetectorTrigger.constant_gate, + trigger=DetectorTrigger.CONSTANT_GATE, deadtime=deadtime, livetime=exposure, frame_timeout=frame_timeout, diff --git a/tests/core/test_device_save_loader.py b/tests/core/test_device_save_loader.py index 2eb1b6967d..f4a5711da5 100644 --- a/tests/core/test_device_save_loader.py +++ b/tests/core/test_device_save_loader.py @@ -95,7 +95,7 @@ async def test_save_device_all_types( await device_all_types.my_int.set(1) await device_all_types.my_float.set(1.234) await device_all_types.my_str.set("test_string") - await device_all_types.enum.set(ExampleEnum.b) + await device_all_types.enum.set(ExampleEnum.B) await device_all_types.enum2.set("Bbb") for pv, dtype in { device_all_types.int8a: np.int8, @@ -141,7 +141,7 @@ async def test_save_device_all_types( int=np.array([1, 8, -9, 32], np.int32), float=np.array([1.8, 8.2, -6, 32.9887], np.float64), str=["Hello", "World", "Foo", "Bar"], - enum=[ExampleEnum.a, ExampleEnum.b, ExampleEnum.a, ExampleEnum.c], + enum=[ExampleEnum.A, ExampleEnum.B, ExampleEnum.A, ExampleEnum.C], ) ) diff --git a/tests/epics/signal/test_signals.py b/tests/epics/signal/test_signals.py index fce394d7fa..b44221b192 100644 --- a/tests/epics/signal/test_signals.py +++ b/tests/epics/signal/test_signals.py @@ -774,7 +774,7 @@ def test_signal_helpers(): async def test_str_enum_returns_enum(ioc, protocol): device = await connect_example_device(ioc, protocol) val = await device.enum.get_value() - assert repr(val) == "" + assert repr(val) == "" assert val is ExampleEnum.B assert val == "Bbb"