aboutsummaryrefslogtreecommitdiff
path: root/src/argaze.test/ArUcoMarkers/ArUcoMarker.py
blob: 8981580e7afe414c3a2939df5ae85e9d71016d0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
""" """

__author__ = "Théo de la Hogue"
__credits__ = []
__copyright__ = "Copyright 2023, Ecole Nationale de l'Aviation Civile (ENAC)"
__license__ = "BSD"

import unittest

from argaze.ArUcoMarkers import ArUcoMarkersDictionary, ArUcoMarker

class TestArUcoMarkerClass(unittest.TestCase):
    """Test ArUcoMarker class."""

    def test_new(self):
        """Test ArUcoMarker creation."""

        # Check DICT_ARUCO_ORIGINAL ArUcoMarker creation
        aruco_dictionary = ArUcoMarkersDictionary.ArUcoMarkersDictionary('DICT_ARUCO_ORIGINAL')

        aruco_marker = aruco_dictionary.create_marker(0, 3)

        self.assertEqual(aruco_marker.dictionary, aruco_dictionary)
        self.assertEqual(aruco_marker.identifier, 0)
        self.assertEqual(aruco_marker.size, 3)

if __name__ == '__main__':

    unittest.main()