Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies = [
"ophyd >= 1.10.5",
"ophyd-async >= 0.14.0",
"bluesky >= 1.14.6",
"dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git@62960e0e587bf86943ce1b581848fa131ef884d5",
"dls-dodal @ git+https://github.com/DiamondLightSource/dodal.git@1794_inject_zebra_logic",
]


Expand Down
11 changes: 2 additions & 9 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
from dodal.devices.undulator import UndulatorInKeV
from dodal.devices.webcam import Webcam
from dodal.devices.xbpm_feedback import XBPMFeedback
from dodal.devices.zebra.zebra import ArmDemand, Zebra
from dodal.devices.zebra.zebra import Zebra
from dodal.devices.zebra.zebra_controlled_shutter import ZebraShutter
from dodal.devices.zocalo import ZocaloResults
from dodal.devices.zocalo.zocalo_results import _NO_SAMPLE_ID
Expand Down Expand Up @@ -427,14 +427,7 @@ def aithre_gonio():

@pytest.fixture
def zebra():
zebra = i03.zebra.build(connect_immediately=True, mock=True)

def mock_side(demand: ArmDemand):
set_mock_value(zebra.pc.arm.armed, demand.value)
return NullStatus()

zebra.pc.arm.set = MagicMock(side_effect=mock_side)
return zebra
return i03.zebra.build(connect_immediately=True, mock=True)


@pytest.fixture
Expand Down
14 changes: 2 additions & 12 deletions tests/unit_tests/beamlines/i24/serial/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from dodal.devices.i24.focus_mirrors import FocusMirrorsMode, HFocusMode, VFocusMode
from dodal.devices.zebra.zebra import Zebra
from dodal.utils import AnyDeviceFactory
from ophyd_async.core import callback_on_mock_put, get_mock_put, set_mock_value
from ophyd_async.core import callback_on_mock_put, set_mock_value

from mx_bluesky.beamlines.i24.serial.fixed_target.ft_utils import ChipType
from mx_bluesky.beamlines.i24.serial.parameters import (
Expand Down Expand Up @@ -87,17 +87,7 @@ def fake_generator(value):

@pytest.fixture
def zebra(run_engine) -> Zebra:
zebra = i24.zebra(connect_immediately=True, mock=True)

def mock_disarm(_, wait):
set_mock_value(zebra.pc.arm.armed, 0)

def mock_arm(_, wait):
set_mock_value(zebra.pc.arm.armed, 1)

get_mock_put(zebra.pc.arm.arm_set).side_effect = mock_arm
get_mock_put(zebra.pc.arm.disarm_set).side_effect = mock_disarm
return zebra
return i24.zebra(connect_immediately=True, mock=True)


@pytest.fixture
Expand Down