aboutsummaryrefslogtreecommitdiff
path: root/tools/interface_generator/templates_unittest.py
blob: 594753d4f6df681606c898f49c05c1aaf5700a54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python3

import unittest
import templates
from pathlib import Path


class Templates(unittest.TestCase):
    def test_get_templates(self):
        path = Path("templates")
        result = templates.get_templates(path)

        self.assertGreater(len(result), 0)
        for template in result:
            self.assertTrue(isinstance(template, Path))
            self.assertTrue(template.exists())
            self.assertTrue(template.is_file())


if __name__ == "__main__":
    unittest.main()