Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
(#1218) Remove 2d gridscan test and dedup fixtures, remove obsolete T…
Browse files Browse the repository at this point in the history
…ODOs as per PR feedback
  • Loading branch information
rtuck99 committed Apr 8, 2024
1 parent 5b83260 commit 78a664d
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 628 deletions.
1 change: 0 additions & 1 deletion src/hyperion/external_interaction/nexus/nexus_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ def create_beam_and_attenuator_parameters(
tuple[Beam, Attenuator]: Descriptions of the beam and attenuator for nexgen.
"""
return (
# TODO 1173 Get this data from events rather than ispyb_params
Beam(convert_eV_to_angstrom(energy_kev * 1000), flux), # pyright: ignore
Attenuator(transmission_fraction), # pyright: ignore
)
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def test_remote_callbacks_write_to_dev_ispyb_for_rotation(
test_rotation_params.hyperion_params.ispyb_params.beam_size_x = test_bs_x
test_rotation_params.hyperion_params.ispyb_params.beam_size_y = test_bs_y
test_rotation_params.hyperion_params.detector_params.exposure_time = test_exp_time
# TODO this should not be set here
# TODO 1173 this should not be set here
test_rotation_params.hyperion_params.ispyb_params.current_energy_ev = (
convert_angstrom_to_eV(test_wl)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
)
from ..external_interaction.callbacks.conftest import TestData
from .conftest import (
assert_event,
mock_zocalo_trigger,
modified_interactor_mock,
modified_store_grid_scan_mock,
Expand Down Expand Up @@ -816,11 +817,3 @@ def test_tidy_up_plans_disable_panda_and_zebra(
RE(tidy_up_plans(MagicMock()))
mock_panda_tidy.assert_called_once()
mock_zebra_tidy.assert_called_once()


def assert_event(mock_call, expected):
actual = mock_call.args[0]
if "data" in actual:
actual = actual["data"]
for k, v in expected.items():
assert actual[k] == v, f"Mismatch in key {k}, {actual} <=> {expected}"
Loading

0 comments on commit 78a664d

Please sign in to comment.