@@ -49,6 +49,7 @@ async def scintillator_and_ap_sg(
4949@pytest .mark .parametrize (
5050 "y, z, expected_position" ,
5151 [
52+ (100.855 , 101.5115 , InOut .IN ),
5253 (- 0.02 , 0.1 , InOut .OUT ),
5354 (0.1 , 0.1 , InOut .UNKNOWN ),
5455 (10.2 , 15.6 , InOut .UNKNOWN ),
@@ -87,6 +88,11 @@ async def test_given_aperture_scatterguard_parked_when_set_to_out_position_then_
8788 assert await scintillator .y_mm .user_setpoint .get_value () == - 0.02
8889 assert await scintillator .z_mm .user_setpoint .get_value () == 0.1
8990
91+ await scintillator .selected_pos .set (InOut .IN )
92+
93+ assert await scintillator .y_mm .user_setpoint .get_value () == - 100.855
94+ assert await scintillator .z_mm .user_setpoint .get_value () == 101.5115
95+
9096
9197async def test_given_aperture_scatterguard_not_parked_when_set_to_out_position_then_exception_raised (
9298 scintillator_and_ap_sg : tuple [Scintillator , ApertureScatterguard ],
@@ -95,9 +101,10 @@ async def test_given_aperture_scatterguard_not_parked_when_set_to_out_position_t
95101 if position != ApertureValue .PARKED :
96102 scintillator , ap_sg = scintillator_and_ap_sg
97103 ap_sg .return_value .selected_aperture .get_value .return_value = position # type: ignore
98-
99104 with pytest .raises (ValueError ):
100105 await scintillator .selected_pos .set (InOut .OUT )
106+ with pytest .raises (ValueError ):
107+ await scintillator .selected_pos .set (InOut .IN )
101108
102109
103110async def test_given_scintillator_already_out_when_moved_out_then_does_nothing (
0 commit comments