diff options
Diffstat (limited to 'src/argaze.test/GazeFeatures.py')
-rw-r--r-- | src/argaze.test/GazeFeatures.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/argaze.test/GazeFeatures.py b/src/argaze.test/GazeFeatures.py index dd3f1c0..b8d173c 100644 --- a/src/argaze.test/GazeFeatures.py +++ b/src/argaze.test/GazeFeatures.py @@ -287,6 +287,37 @@ class TestTimeStampedGazePositionsClass(unittest.TestCase): self.assertEqual(ts_gaze_positions_dataframe["value"].dtype, 'object') self.assertEqual(ts_gaze_positions_dataframe["precision"].dtype, 'O') # Python object type +class TestGazeMovementClass(unittest.TestCase): + """Test GazeMovement class.""" + + def test_new(self): + """Test GazeMovement creation.""" + + abstract_gaze_movement = GazeFeatures.GazeMovement(random_gaze_positions(0)) + + # Check abstract GazeMovement + self.assertEqual(len(abstract_gaze_movement.positions), 0) + self.assertEqual(abstract_gaze_movement.duration, -1) + self.assertEqual(abstract_gaze_movement.amplitude, -1) + self.assertEqual(abstract_gaze_movement.valid, False) + self.assertEqual(abstract_gaze_movement.finished, False) + +class TestUnvalidGazeMovementClass(unittest.TestCase): + """Test UnvalidGazeMovement class.""" + + def test_new(self): + """Test UnvalidGazeMovement creation.""" + + unvalid_gaze_movement = GazeFeatures.UnvalidGazeMovement('test') + + # Check UnvalidGazeMovement + self.assertEqual(len(unvalid_gaze_movement.positions), 0) + self.assertEqual(unvalid_gaze_movement.duration, -1) + self.assertEqual(unvalid_gaze_movement.amplitude, -1) + self.assertEqual(unvalid_gaze_movement.valid, False) + self.assertEqual(unvalid_gaze_movement.finished, False) + self.assertEqual(unvalid_gaze_movement.message, 'test') + class TestScanStepClass(unittest.TestCase): """Test ScanStep class.""" |