testmypyc.py 397 B

1234567891011121314
  1. """A basic check to make sure that we are using a mypyc-compiled version when expected."""
  2. from __future__ import annotations
  3. import os
  4. from unittest import TestCase
  5. import mypy
  6. class MypycTest(TestCase):
  7. def test_using_mypyc(self) -> None:
  8. if os.getenv("TEST_MYPYC", None) == "1":
  9. assert not mypy.__file__.endswith(".py"), "Expected to find a mypyc-compiled version"