diff options
Diffstat (limited to 'src/argaze.test')
-rw-r--r-- | src/argaze.test/ArGazeProject.py | 7 | ||||
-rw-r--r-- | src/argaze.test/utils/project.json | 16 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/argaze.test/ArGazeProject.py b/src/argaze.test/ArGazeProject.py index f37e1f5..8e449bf 100644 --- a/src/argaze.test/ArGazeProject.py +++ b/src/argaze.test/ArGazeProject.py @@ -5,6 +5,7 @@ import os from argaze import ArGazeProject +import numpy class TestArGazeProjectClass(unittest.TestCase): """Test ArGazeProject class.""" @@ -23,8 +24,10 @@ class TestArGazeProjectClass(unittest.TestCase): self.assertEqual(argaze_project.name, "TestProject") # Check ArUco camera - print(argaze_project.aruco_camera) - self.assertEqual(argaze_project.aruco_camera.rms, 0.) + self.assertEqual(argaze_project.aruco_camera.rms, 1.0) + self.assertIsNone(numpy.testing.assert_array_equal(argaze_project.aruco_camera.dimensions, [1920, 1080])) + self.assertIsNone(numpy.testing.assert_array_equal(argaze_project.aruco_camera.K, [[1.0, 0.0, 1.0], [0.0, 1.0, 1.0], [0.0, 0.0, 1.0]])) + self.assertIsNone(numpy.testing.assert_array_equal(argaze_project.aruco_camera.D, [-1.0, -0.5, 0.0, 0.5, 1.0])) if __name__ == '__main__': diff --git a/src/argaze.test/utils/project.json b/src/argaze.test/utils/project.json index 96c644b..e2812f2 100644 --- a/src/argaze.test/utils/project.json +++ b/src/argaze.test/utils/project.json @@ -1,7 +1,7 @@ { "name": "TestProject", "aruco_camera": { - "rms": 0.0, + "rms": 1.0, "dimensions": [ 1920, 1080 @@ -24,13 +24,11 @@ ] ], "D": [ - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - ] + -1.0, + -0.5, + 0.0, + 0.5, + 1.0 + ] } }
\ No newline at end of file |