Provide both required arguments to move_in_image_coordinates
The integration test checks that moving in image coordinates fails before the CSM thing is calibrated. Unfortunately, it is missing the `y` argument, so it would fail either way. This commit supplies the extra argument so that the failure should come from the right place. It also changes the expected error to `ServerActionError` and adds a check for the message, to verify it is due to missing calibration data. A future version of the LabThings Client (#89) may raise a different error if a required argument is missing, so fixing this will ensure that upstream change doesn't break anything here.
This commit is contained in:
parent
8f40f4d4e4
commit
87c4a2aadf
1 changed files with 8 additions and 2 deletions
|
|
@ -114,8 +114,14 @@ def test_camera_stage_mapping_calibration(simulation_test_env):
|
||||||
assert csm.image_to_stage_displacement_matrix is None
|
assert csm.image_to_stage_displacement_matrix is None
|
||||||
assert csm.last_calibration is None
|
assert csm.last_calibration is None
|
||||||
# And therefore that actions error
|
# And therefore that actions error
|
||||||
with pytest.raises(lt.exceptions.FailedToInvokeActionError):
|
with pytest.raises(
|
||||||
csm.move_in_image_coordinates(x=10)
|
lt.exceptions.ServerActionError,
|
||||||
|
match=(
|
||||||
|
r"The camera_stage_mapping calibration is not yet available\. "
|
||||||
|
r"This probably means you need to run the calibration routine\."
|
||||||
|
),
|
||||||
|
):
|
||||||
|
csm.move_in_image_coordinates(x=10, y=0)
|
||||||
|
|
||||||
# Calibrate
|
# Calibrate
|
||||||
csm.calibrate_xy()
|
csm.calibrate_xy()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue