aboutsummaryrefslogtreecommitdiff
path: root/src/argaze.test
diff options
context:
space:
mode:
authorThéo de la Hogue2024-02-29 16:40:28 +0100
committerThéo de la Hogue2024-02-29 16:40:28 +0100
commitac8cc60d27a57c892354214b04327878b511cc44 (patch)
treedd0e723ed127c9bf4cb44c5f1b6204844f3d7bb5 /src/argaze.test
parente18530884d302331b3a7cabd6f7e0d2d1ef155ca (diff)
downloadargaze-ac8cc60d27a57c892354214b04327878b511cc44.zip
argaze-ac8cc60d27a57c892354214b04327878b511cc44.tar.gz
argaze-ac8cc60d27a57c892354214b04327878b511cc44.tar.bz2
argaze-ac8cc60d27a57c892354214b04327878b511cc44.tar.xz
Checking gaze position.
Diffstat (limited to 'src/argaze.test')
-rw-r--r--src/argaze.test/GazeFeatures.py12
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):