diff options
Diffstat (limited to 'src/argaze.test')
-rw-r--r-- | src/argaze.test/GazeFeatures.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/argaze.test/GazeFeatures.py b/src/argaze.test/GazeFeatures.py index c0c014c..035c76a 100644 --- a/src/argaze.test/GazeFeatures.py +++ b/src/argaze.test/GazeFeatures.py @@ -71,7 +71,7 @@ class TestGazePositionClass(unittest.TestCase): empty_gaze_position = GazeFeatures.GazePosition(message="empty for test") self.assertEqual(empty_gaze_position, ()) - self.assertEqual(empty_gaze_position.value, ()) + self.assertEqual(empty_gaze_position, ()) self.assertEqual(empty_gaze_position.precision, None) self.assertEqual(empty_gaze_position.message, "empty for test") self.assertEqual(len(empty_gaze_position), 0) @@ -84,7 +84,7 @@ class TestGazePositionClass(unittest.TestCase): self.assertEqual(int_gaze_position, (123, 456)) self.assertEqual(int_gaze_position[0], 123) self.assertEqual(int_gaze_position[1], 456) - self.assertEqual(int_gaze_position.value, (123, 456)) + self.assertEqual(int_gaze_position, (123, 456)) self.assertEqual(int_gaze_position.precision, 55) self.assertEqual(len(int_gaze_position), 2) self.assertEqual(bool(int_gaze_position), True) @@ -96,7 +96,7 @@ class TestGazePositionClass(unittest.TestCase): self.assertEqual(float_gaze_position, (1.23, 4.56)) self.assertEqual(float_gaze_position[0], 1.23) self.assertEqual(float_gaze_position[1], 4.56) - self.assertEqual(float_gaze_position.value, (1.23, 4.56)) + self.assertEqual(float_gaze_position, (1.23, 4.56)) self.assertEqual(float_gaze_position.precision, 5.5) self.assertEqual(len(float_gaze_position), 2) self.assertEqual(bool(float_gaze_position), True) @@ -111,9 +111,11 @@ class TestGazePositionClass(unittest.TestCase): with self.assertRaises(AttributeError): gaze_position.value = (12, 34) + # WARNING: gaze_position = (12, 34) is possible !!!! + # How to prevent this? - self.assertNotEqual(gaze_position.value, (12, 34)) - self.assertEqual(gaze_position.value, ()) + self.assertNotEqual(gaze_position, (12, 34)) + self.assertEqual(gaze_position, ()) # Check that gaze position precision setting fails with self.assertRaises(AttributeError): |