aboutsummaryrefslogtreecommitdiff
path: root/src/argaze.test
diff options
context:
space:
mode:
authorThéo de la Hogue2022-11-30 15:30:52 +0100
committerThéo de la Hogue2022-11-30 15:30:52 +0100
commite79bdd84da97fa9e766cc6aca548517c4af322c2 (patch)
treef90e03e1e7bc7ddbda78794bb90fd2356c4796b6 /src/argaze.test
parent6c34f47b99625207d44a785c705da8bd7967885f (diff)
downloadargaze-e79bdd84da97fa9e766cc6aca548517c4af322c2.zip
argaze-e79bdd84da97fa9e766cc6aca548517c4af322c2.tar.gz
argaze-e79bdd84da97fa9e766cc6aca548517c4af322c2.tar.bz2
argaze-e79bdd84da97fa9e766cc6aca548517c4af322c2.tar.xz
Fixing string display.
Diffstat (limited to 'src/argaze.test')
-rw-r--r--src/argaze.test/AreaOfInterest/AOIFeatures.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/argaze.test/AreaOfInterest/AOIFeatures.py b/src/argaze.test/AreaOfInterest/AOIFeatures.py
index 0a5e44c..c1158f6 100644
--- a/src/argaze.test/AreaOfInterest/AOIFeatures.py
+++ b/src/argaze.test/AreaOfInterest/AOIFeatures.py
@@ -66,6 +66,17 @@ class TestAreaOfInterestClass(unittest.TestCase):
self.assertEqual(repr(aoi_2D_float), f'[[0.0, 0.0], [0.0, {repr(math.pi)}], [{repr(math.pi)}, 0.0], [{repr(math.pi)}, {repr(math.pi)}]]')
+ def test___str__(self):
+ """Test AreaOfInterest string display."""
+
+ aoi_2D_int = AOIFeatures.AreaOfInterest([[0, 0], [0, 1], [1, 0], [1, 1]])
+
+ self.assertEqual(str(aoi_2D_int), "[[0, 0], [0, 1], [1, 0], [1, 1]]")
+
+ aoi_2D_float = AOIFeatures.AreaOfInterest([[0, 0], [0, math.pi], [math.pi, 0], [math.pi, math.pi]])
+
+ self.assertEqual(str(aoi_2D_float), f'[[0.0, 0.0], [0.0, {str(math.pi)}], [{str(math.pi)}, 0.0], [{str(math.pi)}, {str(math.pi)}]]')
+
def text_clockwise(self):
"""Test AreaOfInterest clockwise method."""