From 15592d9938f15a73ad4bd052c42b3316a95c1c6d Mon Sep 17 00:00:00 2001 From: Daniel Fernandes Date: Fri, 17 Jan 2025 16:33:18 +0000 Subject: [PATCH] Add oav fixture, test_bimorph_optimisaiton skeleton --- tests/plans/test_bimorph.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/plans/test_bimorph.py b/tests/plans/test_bimorph.py index 6ca295048c..5ef7e258af 100644 --- a/tests/plans/test_bimorph.py +++ b/tests/plans/test_bimorph.py @@ -3,7 +3,8 @@ import pytest from bluesky.run_engine import RunEngine from bluesky.utils import Msg -from ophyd_async.core import DeviceCollector +from ophyd_async.core import DeviceCollector, StandardDetector +from ophyd_async.epics.adsimdetector import SimDetector from ophyd_async.testing import callback_on_mock_put, set_mock_value from dodal.devices.slits import Slits @@ -26,6 +27,11 @@ def callback(value, wait=False, signal=motor.user_readback): return slits +@pytest.fixture +def oav(static_path_provider) -> StandardDetector: + return SimDetector("FAKE-PREFIX", path_provider=static_path_provider) + + @pytest.mark.parametrize("dimension", [SlitDimension.X, SlitDimension.Y]) @pytest.mark.parametrize("gap", [1.0]) @pytest.mark.parametrize("center", [2.0]) @@ -50,3 +56,20 @@ async def test_move_slits( Msg("set", centre_signal, center, group=ANY), Msg("wait", None, group=ANY), ] == messages + + +async def test_bimorph_optimisation( + mirror_with_mocked_put, + slits, + oav, + voltage_increment, + active_dimension, + active_slit_center_start, + active_slit_center_end, + active_slit_size, + inactive_slit_center, + inactive_slit_size, + number_of_slit_positions, + bimorph_settle_time, + initial_voltage_list, +): ...