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

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