- self.fail(f"mypy not installed.")
- cmd = ["mypy", "--strict", "--ignore-missing-imports", "gps303"]
- output = run(cmd, capture_output=True)
- if output.returncode != 0:
- self.fail(
- f"mypy exited with code {output.returncode}:\n{output.stderr.decode()}"
- )
+ self.fail("mypy not installed.")
+ cmd = [
+ "mypy",
+ "--strict",
+ "--ignore-missing-imports",
+ "gps303",
+ "test",
+ ]
+ self.assertEqual(call(cmd), 0, "mypy typecheck")