aboutsummaryrefslogtreecommitdiff
path: root/src/argaze.test
diff options
context:
space:
mode:
authorThéo de la Hogue2023-11-07 15:54:45 +0100
committerThéo de la Hogue2023-11-07 15:54:45 +0100
commit78ce6ffc892ef7d64a8d1da0dbdfcbf34d214bbd (patch)
tree4509c14aa1800d2666c50c47549a044e5a6c11d0 /src/argaze.test
parentbc9257268bb54ea68f777cbb853dc6498274dd99 (diff)
parentf8b1a36c9e486ef19f62159475b9bf19a5b90a03 (diff)
downloadargaze-78ce6ffc892ef7d64a8d1da0dbdfcbf34d214bbd.zip
argaze-78ce6ffc892ef7d64a8d1da0dbdfcbf34d214bbd.tar.gz
argaze-78ce6ffc892ef7d64a8d1da0dbdfcbf34d214bbd.tar.bz2
argaze-78ce6ffc892ef7d64a8d1da0dbdfcbf34d214bbd.tar.xz
Merge branch 'master' of ssh://git.recherche.enac.fr/interne-ihm-aero/eye-tracking/argaze
Diffstat (limited to 'src/argaze.test')
-rw-r--r--src/argaze.test/AreaOfInterest/AOI2DScene.py6
-rw-r--r--src/argaze.test/AreaOfInterest/AOI3DScene.py6
-rw-r--r--src/argaze.test/AreaOfInterest/AOIFeatures.py8
-rw-r--r--src/argaze.test/GazeAnalysis/ExploreExploitRatio.py (renamed from src/argaze.test/GazeAnalysis/ExploitExploreRatio.py)6
-rw-r--r--src/argaze.test/GazeFeatures.py4
5 files changed, 17 insertions, 13 deletions
diff --git a/src/argaze.test/AreaOfInterest/AOI2DScene.py b/src/argaze.test/AreaOfInterest/AOI2DScene.py
index 4e96e98..10ff430 100644
--- a/src/argaze.test/AreaOfInterest/AOI2DScene.py
+++ b/src/argaze.test/AreaOfInterest/AOI2DScene.py
@@ -187,14 +187,14 @@ class TestTimeStampedAOIScenesClass(unittest.TestCase):
aoi_2D_B = AOIFeatures.AreaOfInterest([[1, 1], [1, 2], [2, 2], [2, 1]])
aoi_2d_scene = AOI2DScene.AOI2DScene({"A": aoi_2D_A, "B": aoi_2D_B})
- ts_aois_scenes = AOIFeatures.TimeStampedAOIScenes()
+ ts_aoi_scenes = AOIFeatures.TimeStampedAOIScenes()
- ts_aois_scenes[0] = aoi_2d_scene
+ ts_aoi_scenes[0] = aoi_2d_scene
# Check that only AOIScene can be added
with self.assertRaises(AssertionError):
- ts_aois_scenes[1] = "This string is not an AOI2DScene"
+ ts_aoi_scenes[1] = "This string is not an AOI2DScene"
if __name__ == '__main__':
diff --git a/src/argaze.test/AreaOfInterest/AOI3DScene.py b/src/argaze.test/AreaOfInterest/AOI3DScene.py
index b386432..d09f2a8 100644
--- a/src/argaze.test/AreaOfInterest/AOI3DScene.py
+++ b/src/argaze.test/AreaOfInterest/AOI3DScene.py
@@ -107,14 +107,14 @@ class TestTimeStampedAOIScenesClass(unittest.TestCase):
aoi_3D_B = AOIFeatures.AreaOfInterest([[1, 1, 0], [1, 2, 0], [2, 2, 0], [2, 1, 0]])
aoi_3d_scene = AOI3DScene.AOI3DScene({"A": aoi_3D_A, "B": aoi_3D_B})
- ts_aois_scenes = AOIFeatures.TimeStampedAOIScenes()
+ ts_aoi_scenes = AOIFeatures.TimeStampedAOIScenes()
- ts_aois_scenes[0] = aoi_3d_scene
+ ts_aoi_scenes[0] = aoi_3d_scene
# Check that only AOIScene can be added
with self.assertRaises(AssertionError):
- ts_aois_scenes[1] = "This string is not an AOI3DScene"
+ ts_aoi_scenes[1] = "This string is not an AOI3DScene"
if __name__ == '__main__':
diff --git a/src/argaze.test/AreaOfInterest/AOIFeatures.py b/src/argaze.test/AreaOfInterest/AOIFeatures.py
index cc75ed8..cb8fb52 100644
--- a/src/argaze.test/AreaOfInterest/AOIFeatures.py
+++ b/src/argaze.test/AreaOfInterest/AOIFeatures.py
@@ -118,13 +118,17 @@ class TestAreaOfInterestClass(unittest.TestCase):
aoi_2D = AOIFeatures.AreaOfInterest([[0, 0], [0, 2], [2, 2], [2, 0]])
- self.assertEqual(aoi_2D.inner_axis((1, 1)), (0.5, 0.5))
+ self.assertEqual(aoi_2D.inner_axis(1, 1), (0.5, 0.5))
def test_outter_axis(self):
aoi_2D = AOIFeatures.AreaOfInterest([[0, 0], [0, 2], [2, 2], [2, 0]])
- self.assertEqual(aoi_2D.outter_axis((0.5, 0.5)), (1, 1))
+ self.assertEqual(aoi_2D.outter_axis(0.5, 0.5), (1, 1))
+
+ aoi_3D = AOIFeatures.AreaOfInterest([[1, 0, 0], [1, 0, 2], [1, 2, 2], [1, 2, 0]])
+
+ self.assertEqual(aoi_3D.outter_axis(0.5, 0.5), (1, 1, 1))
def test_circle_intersection(self):
diff --git a/src/argaze.test/GazeAnalysis/ExploitExploreRatio.py b/src/argaze.test/GazeAnalysis/ExploreExploitRatio.py
index 0e6b74a..7b323d4 100644
--- a/src/argaze.test/GazeAnalysis/ExploitExploreRatio.py
+++ b/src/argaze.test/GazeAnalysis/ExploreExploitRatio.py
@@ -10,7 +10,7 @@ __license__ = "BSD"
import unittest
from argaze import GazeFeatures
-from argaze.GazeAnalysis import ExploitExploreRatio
+from argaze.GazeAnalysis import ExploreExploitRatio
from argaze.utils import UtilsFeatures
GazeFeaturesTest = UtilsFeatures.importFromTestPackage('GazeFeatures')
@@ -21,7 +21,7 @@ class TestScanPathAnalyzer(unittest.TestCase):
def test_analyze(self):
"""Test analyze method."""
- xxr_analyzer = ExploitExploreRatio.ScanPathAnalyzer()
+ xxr_analyzer = ExploreExploitRatio.ScanPathAnalyzer()
scan_path = GazeFeaturesTest.build_scan_path(10)
@@ -31,7 +31,7 @@ class TestScanPathAnalyzer(unittest.TestCase):
xxr_analyzer.analyze(scan_path)
# Check exploit explore ratio: it should greater than 1 because of build_scan_path
- self.assertGreaterEqual(xxr_analyzer.exploit_explore_ratio, 1.)
+ self.assertGreaterEqual(xxr_analyzer.explore_exploit_ratio, 1.)
if __name__ == '__main__':
diff --git a/src/argaze.test/GazeFeatures.py b/src/argaze.test/GazeFeatures.py
index d609dd2..b41c7c7 100644
--- a/src/argaze.test/GazeFeatures.py
+++ b/src/argaze.test/GazeFeatures.py
@@ -497,10 +497,10 @@ class TestAOIScanStepClass(unittest.TestCase):
aoi_scan_step = GazeFeatures.AOIScanStep(movements, 'Test')
-def build_aoi_scan_path(expected_aois, aoi_path):
+def build_aoi_scan_path(expected_aoi, aoi_path):
"""Build AOI scan path"""
- aoi_scan_path = GazeFeatures.AOIScanPath(expected_aois)
+ aoi_scan_path = GazeFeatures.AOIScanPath(expected_aoi)
# Append a hidden last step to allow last given step creation
aoi_path.append(aoi_path[-2])