Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename aperture/scatterguard to remove underscore
Browse files Browse the repository at this point in the history
DominicOram committed Jan 22, 2025
1 parent 4eaff9e commit 2d68795
Showing 2 changed files with 10 additions and 12 deletions.
18 changes: 9 additions & 9 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -559,15 +559,15 @@ def aperture_scatterguard(RE):
):
ap_sg = i03.aperture_scatterguard(fake_with_ophyd_sim=True)
with (
patch_async_motor(ap_sg._aperture.x),
patch_async_motor(ap_sg._aperture.y),
patch_async_motor(ap_sg._aperture.z, 2),
patch_async_motor(ap_sg._scatterguard.x),
patch_async_motor(ap_sg._scatterguard.y),
patch_async_motor(ap_sg.aperture().x),
patch_async_motor(ap_sg.aperture().y),
patch_async_motor(ap_sg.aperture().z, 2),
patch_async_motor(ap_sg.scatterguard.x),
patch_async_motor(ap_sg.scatterguard.y),
):
RE(bps.abs_set(ap_sg, ApertureValue.SMALL))

set_mock_value(ap_sg._aperture.small, 1)
set_mock_value(ap_sg.aperture().small, 1)
yield ap_sg


@@ -926,9 +926,9 @@ def assert_events_and_data_in_order(
for event_data_keys in match_data_keys_list:
docs = DocumentCapturer.get_docs_from(docs, "event")
doc = docs.pop(0)[1]["data"]
assert all(
k in doc.keys() for k in event_data_keys
), f"One of {event_data_keys=} not in {doc}"
assert all(k in doc.keys() for k in event_data_keys), (
f"One of {event_data_keys=} not in {doc}"
)


@pytest.fixture
4 changes: 1 addition & 3 deletions tests/system_tests/hyperion/external_interaction/conftest.py
Original file line number Diff line number Diff line change
@@ -321,9 +321,7 @@ def fgs_composite_for_fake_zocalo(
zocalo_for_fake_zocalo: ZocaloResults,
done_status: NullStatus,
) -> FlyScanXRayCentreComposite:
set_mock_value(
fake_fgs_composite.aperture_scatterguard._aperture.z.user_setpoint, 2
)
set_mock_value(fake_fgs_composite.aperture_scatterguard.aperture.z.user_setpoint, 2)
fake_fgs_composite.eiger.unstage = MagicMock(return_value=done_status) # type: ignore
fake_fgs_composite.smargon.stub_offsets.set = MagicMock(return_value=done_status) # type: ignore
callback_on_mock_put(

0 comments on commit 2d68795

Please sign in to comment.