diff options
author | Théo de la Hogue | 2023-05-30 13:34:44 +0200 |
---|---|---|
committer | Théo de la Hogue | 2023-05-30 13:34:44 +0200 |
commit | 2c296a5adc88d9fde36d6c8e24ca275a7088a8f9 (patch) | |
tree | da87a530eb8b64355df90377d6abf06d6df07763 /src/argaze.test/GazeFeatures.py | |
parent | b1c5eaa9974d91263083ea457b65ad60c20cca85 (diff) | |
download | argaze-2c296a5adc88d9fde36d6c8e24ca275a7088a8f9.zip argaze-2c296a5adc88d9fde36d6c8e24ca275a7088a8f9.tar.gz argaze-2c296a5adc88d9fde36d6c8e24ca275a7088a8f9.tar.bz2 argaze-2c296a5adc88d9fde36d6c8e24ca275a7088a8f9.tar.xz |
Updating tests.
Diffstat (limited to 'src/argaze.test/GazeFeatures.py')
-rw-r--r-- | src/argaze.test/GazeFeatures.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/argaze.test/GazeFeatures.py b/src/argaze.test/GazeFeatures.py index d6c32ed..f440a4e 100644 --- a/src/argaze.test/GazeFeatures.py +++ b/src/argaze.test/GazeFeatures.py @@ -273,7 +273,7 @@ class TestAOIScanPathClass(unittest.TestCase): def test_append(self): """Test AOIScanPath append methods.""" - aoi_scan_path = GazeFeatures.AOIScanPath() + aoi_scan_path = GazeFeatures.AOIScanPath(['A', 'B']) # Append fixation on A aoi fixation = GazeFeatures.Fixation(random_gaze_positions(10)) @@ -309,7 +309,7 @@ class TestAOIScanPathClass(unittest.TestCase): def test_append_error(self): """Test AOIScanPath append error.""" - aoi_scan_path = GazeFeatures.AOIScanPath() + aoi_scan_path = GazeFeatures.AOIScanPath(['A', 'B']) # Append fixation on A aoi fixation = GazeFeatures.Fixation(random_gaze_positions(10)) @@ -325,11 +325,16 @@ class TestAOIScanPathClass(unittest.TestCase): fixation = GazeFeatures.Fixation(random_gaze_positions(10)) ts, _ = fixation.positions.first - # Check that aoi scan step creation fail + # Check that aoi scan step creation fail when fixation is appened after another fixation with self.assertRaises(GazeFeatures.AOIScanStepError): new_step = aoi_scan_path.append_fixation(ts, fixation, 'B') + # Check that unexpected aoi scan step creation fail + with self.assertRaises(GazeFeatures.AOIScanStepError): + + new_step = aoi_scan_path.append_fixation(ts, fixation, 'C') + if __name__ == '__main__': unittest.main()
\ No newline at end of file |