diff options
Diffstat (limited to 'src/argaze.test/GazeAnalysis')
-rw-r--r-- | src/argaze.test/GazeAnalysis/DispersionThresholdIdentification.py | 28 | ||||
-rw-r--r-- | src/argaze.test/GazeAnalysis/VelocityThresholdIdentification.py | 18 |
2 files changed, 23 insertions, 23 deletions
diff --git a/src/argaze.test/GazeAnalysis/DispersionThresholdIdentification.py b/src/argaze.test/GazeAnalysis/DispersionThresholdIdentification.py index 156f6f1..0bb8ed7 100644 --- a/src/argaze.test/GazeAnalysis/DispersionThresholdIdentification.py +++ b/src/argaze.test/GazeAnalysis/DispersionThresholdIdentification.py @@ -125,7 +125,7 @@ class TestDispersionThresholdIdentificationClass(unittest.TestCase): self.assertLessEqual(fixation.deviation_max, deviation_max) self.assertGreaterEqual(fixation.duration, (size - 1) * min_time) self.assertLessEqual(fixation.duration, (size - 1) * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) def test_fixation_and_direct_saccade_identification(self): """Test DispersionThresholdIdentification fixation and saccade identification.""" @@ -157,7 +157,7 @@ class TestDispersionThresholdIdentificationClass(unittest.TestCase): self.assertLessEqual(fixation.deviation_max, deviation_max) self.assertGreaterEqual(fixation.duration, (size - 1) * min_time) self.assertLessEqual(fixation.duration, (size - 1) * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) # Check first saccade saccade = ts_saccades.pop(0) @@ -165,7 +165,7 @@ class TestDispersionThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(saccade), 2) self.assertGreaterEqual(saccade.duration, min_time) self.assertLessEqual(saccade.duration, max_time) - self.assertLessEqual(saccade.finished, True) + self.assertLessEqual(saccade.is_finished(), True) # Check that last position of a movement is equal to first position of next movement self.assertEqual(fixation[-1].timestamp, saccade[0].timestamp) @@ -178,7 +178,7 @@ class TestDispersionThresholdIdentificationClass(unittest.TestCase): self.assertLessEqual(fixation.deviation_max, deviation_max) self.assertGreaterEqual(fixation.duration, (size - 1) * min_time) self.assertLessEqual(fixation.duration, (size - 1) * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) # Check that last position of a movement is equal to first position of next movement self.assertEqual(saccade[-1].timestamp, fixation[0].timestamp) @@ -217,7 +217,7 @@ class TestDispersionThresholdIdentificationClass(unittest.TestCase): self.assertLessEqual(fixation.deviation_max, deviation_max) self.assertGreaterEqual(fixation.duration, (size - 1) * min_time) self.assertLessEqual(fixation.duration, (size - 1) * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) # Check first saccade saccade = ts_saccades.pop(0) @@ -225,7 +225,7 @@ class TestDispersionThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(saccade), move + 2) self.assertGreaterEqual(saccade.duration, (move + 1) * min_time) self.assertLessEqual(saccade.duration, (move + 1) * max_time) - self.assertLessEqual(saccade.finished, True) + self.assertLessEqual(saccade.is_finished(), True) # Check that last position of a movement is equal to first position of next movement self.assertEqual(fixation[-1].timestamp, saccade[0].timestamp) @@ -238,7 +238,7 @@ class TestDispersionThresholdIdentificationClass(unittest.TestCase): self.assertLessEqual(fixation.deviation_max, deviation_max) self.assertGreaterEqual(fixation.duration, (size - 1) * min_time) self.assertLessEqual(fixation.duration, (size - 1) * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) # Check that last position of a movement is equal to first position of next movement self.assertEqual(saccade[-1].timestamp, fixation[0].timestamp) @@ -271,7 +271,7 @@ class TestDispersionThresholdIdentificationClass(unittest.TestCase): self.assertLessEqual(fixation.deviation_max, deviation_max) self.assertGreaterEqual(fixation.duration, 6 * min_time) self.assertLessEqual(fixation.duration, 6 * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) # Check second fixation fixation = ts_fixations.pop(0) @@ -280,7 +280,7 @@ class TestDispersionThresholdIdentificationClass(unittest.TestCase): self.assertLessEqual(fixation.deviation_max, deviation_max) self.assertGreaterEqual(fixation.duration, 4 * min_time) self.assertLessEqual(fixation.duration, 4 * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) def test_fixation_overlapping(self): """Test Fixation overlap function.""" @@ -340,7 +340,7 @@ class TestDispersionThresholdIdentificationClass(unittest.TestCase): #self.assertGreaterEqual(fixation.deviation_max, deviation_max) self.assertGreaterEqual(fixation.duration, (2 * size - 1) * min_time) self.assertLessEqual(fixation.duration, (2 * size - 1) * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) def test_identification_browsing(self): """Test DispersionThresholdIdentification identification browsing.""" @@ -370,14 +370,14 @@ class TestDispersionThresholdIdentificationClass(unittest.TestCase): self.assertLessEqual(finished_gaze_movement.deviation_max, deviation_max) self.assertGreaterEqual(finished_gaze_movement.duration, (size-1) * min_time) self.assertLessEqual(finished_gaze_movement.duration, (size-1) * max_time) - self.assertLessEqual(finished_gaze_movement.finished, True) + self.assertLessEqual(finished_gaze_movement.is_finished(), True) elif GazeFeatures.is_saccade(finished_gaze_movement): self.assertEqual(len(finished_gaze_movement), 2) self.assertGreaterEqual(finished_gaze_movement.duration, min_time) self.assertLessEqual(finished_gaze_movement.duration, max_time) - self.assertLessEqual(finished_gaze_movement.finished, True) + self.assertLessEqual(finished_gaze_movement.is_finished(), True) # Check that last gaze position date of current fixation is equal to given gaze position date # NOTE: This is not true for saccade as, for I-DT, there is a minimal time window while the gaze movement is unknown @@ -413,14 +413,14 @@ class TestDispersionThresholdIdentificationClass(unittest.TestCase): self.assertLessEqual(finished_gaze_movement.deviation_max, deviation_max) self.assertGreaterEqual(finished_gaze_movement.duration, size * min_time) self.assertLessEqual(finished_gaze_movement.duration, size * max_time) - self.assertLessEqual(finished_gaze_movement.finished, True) + self.assertLessEqual(finished_gaze_movement.is_finished(), True) elif GazeFeatures.is_saccade(finished_gaze_movement): self.assertEqual(len(finished_gaze_movement), 2) self.assertGreaterEqual(finished_gaze_movement.duration, 2 * min_time) self.assertLessEqual(finished_gaze_movement.duration, 2 * max_time) - self.assertLessEqual(finished_gaze_movement.finished, True) + self.assertLessEqual(finished_gaze_movement.is_finished(), True) if __name__ == '__main__': diff --git a/src/argaze.test/GazeAnalysis/VelocityThresholdIdentification.py b/src/argaze.test/GazeAnalysis/VelocityThresholdIdentification.py index 262cfc0..1c7f7e3 100644 --- a/src/argaze.test/GazeAnalysis/VelocityThresholdIdentification.py +++ b/src/argaze.test/GazeAnalysis/VelocityThresholdIdentification.py @@ -125,7 +125,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation), size - 1) self.assertGreaterEqual(fixation.duration, (size - 2) * min_time) self.assertLessEqual(fixation.duration, (size - 2) * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) def test_fixation_and_direct_saccade_identification(self): """Test VelocityThresholdIdentification fixation and saccade identification.""" @@ -157,7 +157,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation), size - 1) self.assertGreaterEqual(fixation.duration, (size - 2) * min_time) self.assertLessEqual(fixation.duration, (size - 2) * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) # Check first saccade saccade = ts_saccades.pop(0) @@ -165,7 +165,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(saccade), 2) self.assertGreaterEqual(saccade.duration, min_time) self.assertLessEqual(saccade.duration, max_time) - self.assertLessEqual(saccade.finished, True) + self.assertLessEqual(saccade.is_finished(), True) # Check that last position of a movement is equal to first position of next movement self.assertEqual(fixation[-1].timestamp, saccade[0].timestamp) @@ -177,7 +177,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation), size) self.assertGreaterEqual(fixation.duration, (size - 1) * min_time) self.assertLessEqual(fixation.duration, (size - 1) * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) # Check that last position of a movement is equal to first position of next movement self.assertEqual(saccade[-1].timestamp, fixation[0].timestamp) @@ -216,7 +216,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation), size - 1) # BUG: NOT ALWAYS TRUE !!! self.assertGreaterEqual(fixation.duration, (size - 2) * min_time) self.assertLessEqual(fixation.duration, (size - 2) * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) # Check first saccade saccade = ts_saccades.pop(0) @@ -224,7 +224,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(saccade), move + 2) self.assertGreaterEqual(saccade.duration, (move + 1) * min_time) self.assertLessEqual(saccade.duration, (move + 1) * max_time) - self.assertLessEqual(saccade.finished, True) + self.assertLessEqual(saccade.is_finished(), True) # Check that last position of a movement is equal to first position of next movement self.assertEqual(fixation[-1].timestamp, saccade[0].timestamp) @@ -236,7 +236,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation), size) self.assertGreaterEqual(fixation.duration, (size - 1) * min_time) self.assertLessEqual(fixation.duration, (size - 1) * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) # Check that last position of a movement is equal to first position of next movement self.assertEqual(saccade[-1], fixation[0]) @@ -269,7 +269,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation), 6) self.assertGreaterEqual(fixation.duration, 5 * min_time) self.assertLessEqual(fixation.duration, 5 * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) # Check second fixation fixation = ts_fixations.pop(0) @@ -277,7 +277,7 @@ class TestVelocityThresholdIdentificationClass(unittest.TestCase): self.assertEqual(len(fixation), 4) self.assertGreaterEqual(fixation.duration, 3 * min_time) self.assertLessEqual(fixation.duration, 3 * max_time) - self.assertLessEqual(fixation.finished, True) + self.assertLessEqual(fixation.is_finished(), True) def test_identification_browsing(self): """Test VelocityThresholdIdentification identification browsing.""" |