Skip to content

Commit

Permalink
Revert motor limits fixture changes and fix system tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rtuck99 committed Nov 14, 2024
1 parent c31f52d commit ba4e87b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ def smargon(RE: RunEngine) -> Generator[Smargon, None, None]:
set_mock_value(smargon.x.user_readback, 0.0)
set_mock_value(smargon.y.user_readback, 0.0)
set_mock_value(smargon.z.user_readback, 0.0)
set_mock_value(smargon.x.high_limit_travel, 4)
set_mock_value(smargon.x.low_limit_travel, -4)
set_mock_value(smargon.y.high_limit_travel, 4)
set_mock_value(smargon.y.low_limit_travel, -4)
set_mock_value(smargon.z.high_limit_travel, 4)
set_mock_value(smargon.z.low_limit_travel, -4)
set_mock_value(smargon.x.high_limit_travel, 2)
set_mock_value(smargon.x.low_limit_travel, -2)
set_mock_value(smargon.y.high_limit_travel, 2)
set_mock_value(smargon.y.low_limit_travel, -2)
set_mock_value(smargon.z.high_limit_travel, 2)
set_mock_value(smargon.z.low_limit_travel, -2)

with (
patch_async_motor(smargon.omega),
Expand Down Expand Up @@ -932,7 +932,7 @@ def assert_none_matching(


def pin_tip_edge_data():
tip_x_px = 100
tip_x_px = 130
tip_y_px = 200
microns_per_pixel = 2.87 # from zoom levels .xml
grid_width_px = int(400 / microns_per_pixel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ def test_update_sample_updates_the_sample_status():
output_sample = sample_handling.update_sample_status(
SAMPLE_ID, BLSampleStatus.ERROR_SAMPLE
)
expected_status = "ERROR - sample error"
expected_status = "ERROR - sample"
assert output_sample.bl_sample_status == expected_status
assert output_sample.container_id == CONTAINER_ID
Original file line number Diff line number Diff line change
Expand Up @@ -267,15 +267,15 @@ def test_execute_load_centre_collect_full_plan(
fetch_datacollection_attribute,
ispyb_gridscan_cb.ispyb_ids.data_collection_ids[0],
"Hyperion: Xray centring - Diffraction grid scan of 30 by 4 "
"images in 20.0 um by 20.0 um steps. Top left (px): [100,152], "
"bottom right (px): [844,251]. Aperture: ApertureValue.SMALL. ",
"images in 20.0 um by 20.0 um steps. Top left (px): [130,152], "
"bottom right (px): [874,251]. Aperture: ApertureValue.SMALL. ",
)
compare_comment(
fetch_datacollection_attribute,
ispyb_gridscan_cb.ispyb_ids.data_collection_ids[1],
"Hyperion: Xray centring - Diffraction grid scan of 30 by 3 "
"images in 20.0 um by 20.0 um steps. Top left (px): [100,165], "
"bottom right (px): [844,239]. Aperture: ApertureValue.SMALL. ",
"images in 20.0 um by 20.0 um steps. Top left (px): [130,165], "
"bottom right (px): [874,239]. Aperture: ApertureValue.SMALL. ",
)

rotation_dcg_id = ispyb_rotation_cb.ispyb_ids.data_collection_group_id
Expand All @@ -299,7 +299,7 @@ def test_execute_load_centre_collect_full_plan(
compare_comment(
fetch_datacollection_attribute,
ispyb_rotation_cb.ispyb_ids.data_collection_ids[0],
"Sample position (µm): (-2506, -573, 370) Hyperion Rotation Scan - Aperture: ApertureValue.SMALL. ",
"Sample position (µm): (-2309, -573, 370) Hyperion Rotation Scan - Aperture: ApertureValue.SMALL. ",
)
assert fetch_blsample(SAMPLE_ID).blSampleStatus == "LOADED" # type: ignore

Expand Down

0 comments on commit ba4e87b

Please sign in to comment.