aboutsummaryrefslogtreecommitdiff
path: root/src/argaze.test/ArGazeProject.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/argaze.test/ArGazeProject.py')
-rw-r--r--src/argaze.test/ArGazeProject.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/argaze.test/ArGazeProject.py b/src/argaze.test/ArGazeProject.py
new file mode 100644
index 0000000..f37e1f5
--- /dev/null
+++ b/src/argaze.test/ArGazeProject.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+import unittest
+import os
+
+from argaze import ArGazeProject
+
+
+class TestArGazeProjectClass(unittest.TestCase):
+ """Test ArGazeProject class."""
+
+ def test_from_json(self):
+ """Test ArGazeProject creation from json file."""
+
+ # Edit project file path
+ current_directory = os.path.dirname(os.path.abspath(__file__))
+ json_filepath = os.path.join(current_directory, 'utils/project.json')
+
+ # Load project
+ argaze_project = ArGazeProject.ArGazeProject.from_json(json_filepath)
+
+ # Check project meta data
+ self.assertEqual(argaze_project.name, "TestProject")
+
+ # Check ArUco camera
+ print(argaze_project.aruco_camera)
+ self.assertEqual(argaze_project.aruco_camera.rms, 0.)
+
+if __name__ == '__main__':
+
+ unittest.main() \ No newline at end of file