Skip to content

Commit cdb0445

Browse files
committed
Fix tests/test_ctrl.py:test_stage wrongly expected stage.x/y/z of float type, not int
1 parent 65c962e commit cdb0445

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_ctrl.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ def test_stage(ctrl):
5959
assert stage.a == 45
6060

6161
stage.set(x=0, y=0, z=0)
62-
stage.move_in_projection(delta_x=1, delta_y=1)
62+
stage.move_in_projection(delta_x=1000, delta_y=1000)
6363

64-
assert abs(stage.y) + abs(stage.z) == pytest.approx(np.sqrt(2))
65-
assert stage.x == 1
64+
assert abs(stage.y) + abs(stage.z) == 1414 # round(np.sqrt(2) * 1000)
65+
assert stage.x == 1000
6666

6767
stage.set(x=0, y=0, z=0)
68-
stage.move_along_optical_axis(1)
69-
assert abs(stage.y) + abs(stage.z) == pytest.approx(np.sqrt(2))
68+
stage.move_along_optical_axis(delta_z=1000)
69+
assert abs(stage.y) + abs(stage.z) == 1414 # round(np.sqrt(2) * 1000)
7070

7171
stage.xy = (0, 0)
7272
stage.move_xy_with_backlash_correction(shift_x=100, shift_y=100)

0 commit comments

Comments
 (0)