aboutsummaryrefslogtreecommitdiff
path: root/src/argaze.test/ArUcoMarkers/ArUcoMarker.py
blob: 4ac19729713ec4fe5a3cf8e63efe640a82e4bf35 (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
30
31
#!/usr/bin/env python

""" """

__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()