aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze.test/GazeFeatures.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/argaze.test/GazeFeatures.py b/src/argaze.test/GazeFeatures.py
index b8d173c..85ba362 100644
--- a/src/argaze.test/GazeFeatures.py
+++ b/src/argaze.test/GazeFeatures.py
@@ -302,6 +302,24 @@ class TestGazeMovementClass(unittest.TestCase):
self.assertEqual(abstract_gaze_movement.valid, False)
self.assertEqual(abstract_gaze_movement.finished, False)
+ def test_finish(self):
+ """Test GazeMovement finishing."""
+
+ abstract_gaze_movement = GazeFeatures.GazeMovement(random_gaze_positions(2))
+
+ abstract_gaze_movement_ref = abstract_gaze_movement
+
+ # Check abstract GazeMovement and its reference
+ self.assertEqual(abstract_gaze_movement.finished, False)
+ self.assertEqual(abstract_gaze_movement_ref.finished, False)
+
+ # Set gaze movement as finished
+ abstract_gaze_movement.finish()
+
+ # Check abstract GazeMovement and its reference
+ self.assertEqual(abstract_gaze_movement.finished, True)
+ self.assertEqual(abstract_gaze_movement_ref.finished, True)
+
class TestUnvalidGazeMovementClass(unittest.TestCase):
"""Test UnvalidGazeMovement class."""