]> www.average.org Git - loctrkd.git/blob - test/test_mypy.py
08f2c5eefdc7b3ed1720d0ac70dfaa563936a99b
[loctrkd.git] / test / test_mypy.py
1 from subprocess import call
2 from shutil import which
3 from unittest import TestCase
4
5
6 class TypeCheck(TestCase):
7     def test_mypy(self) -> None:
8         if not which("mypy"):
9             self.fail("mypy not installed.")
10         cmd = [
11             "mypy",
12             "--strict",
13             "--ignore-missing-imports",
14             "gps303",
15             "test",
16         ]
17         self.assertEqual(call(cmd), 0, "mypy typecheck")