55import pytest
66
77from pyalicevision import camera as av
8+ from pyalicevision import numeric as avnum
89
910##################
1011### List of functions:
@@ -163,12 +164,10 @@ def test_equidistant_default_constructor():
163164 assert intrinsic .h () == 1 , "The Equidistant intrinsic's default height should be 1"
164165
165166 scale = intrinsic .getScale ()
166- # TODO: uncomment check on the scale when Vec2 is binded
167- # assert scale[0] == 1.0 and scale[1] == 1.0
167+ assert avnum .getX (scale ) == 1.0 and avnum .getY (scale ) == 1.0
168168
169169 offset = intrinsic .getOffset ()
170- # TODO: uncomment check on the offset when Vec2 is binded
171- # assert offset[0] == 0.0 and offset[1] == 0.0
170+ assert avnum .getX (offset ) == 0.0 and avnum .getY (offset ) == 0.0
172171
173172 assert intrinsic .sensorWidth () == 36.0
174173 assert intrinsic .sensorHeight () == 24.0
@@ -200,12 +199,10 @@ def test_equidistant_constructors():
200199 assert intrinsic1 .h () == height , "The Equidistant intrinsic's height has not been correctly set"
201200
202201 scale = intrinsic1 .getScale ()
203- # TODO: uncomment check on the scale when Vec2 is binded
204- # assert scale[0] == focal and scale[1] == focal
202+ assert avnum .getX (scale ) == focal and avnum .getY (scale ) == focal
205203
206204 offset = intrinsic1 .getOffset ()
207- # TODO: uncomment check on the offset when Vec2 is binded
208- # assert offset[0] == offset_x and offset[1] == offset_y
205+ assert avnum .getX (offset ) == offset_x and avnum .getY (offset ) == offset_y
209206
210207 assert intrinsic1 .sensorWidth () == 36.0
211208 assert intrinsic1 .sensorHeight () == 24.0
@@ -225,12 +222,10 @@ def test_equidistant_constructors():
225222 assert intrinsic2 .h () == height , "The Equidistant intrinsic's height has not been correctly set"
226223
227224 scale = intrinsic2 .getScale ()
228- # TODO: uncomment check on the scale when Vec2 is binded
229- # assert scale[0] == focal and scale[1] == focal
225+ assert avnum .getX (scale ) == focal and avnum .getY (scale ) == focal
230226
231227 offset = intrinsic2 .getOffset ()
232- # TODO: uncomment check on the offset when Vec2 is binded
233- # assert offset[0] == offset_x and offset[1] == offset_y
228+ assert avnum .getX (offset ) == offset_x and avnum .getY (offset ) == offset_y
234229
235230 assert intrinsic2 .sensorWidth () == 36.0
236231 assert intrinsic2 .sensorHeight () == 24.0
@@ -335,8 +330,7 @@ def test_equidistant_get_set_circle():
335330 assert intrinsic .getCircleCenterY () == center_y
336331
337332 center = intrinsic .getCircleCenter ()
338- # TODO: uncomment when Vec2 is binded
339- # assert center[0] == center_x and center[1] == center_y
333+ assert avnum .getX (center ) == center_x and avnum .getY (center ) == center_y
340334
341335
342336def test_equidistant_ratio_lock_unlock ():
0 commit comments