m2m模型翻译
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
857 B

6 months ago
  1. import os
  2. from pathlib import Path
  3. import numpy as np
  4. from numpy.testing import assert_
  5. ROOT = Path(np.__file__).parents[0]
  6. FILES = [
  7. ROOT / "py.typed",
  8. ROOT / "__init__.pyi",
  9. ROOT / "char.pyi",
  10. ROOT / "ctypeslib.pyi",
  11. ROOT / "rec.pyi",
  12. ROOT / "core" / "__init__.pyi",
  13. ROOT / "distutils" / "__init__.pyi",
  14. ROOT / "f2py" / "__init__.pyi",
  15. ROOT / "fft" / "__init__.pyi",
  16. ROOT / "lib" / "__init__.pyi",
  17. ROOT / "linalg" / "__init__.pyi",
  18. ROOT / "ma" / "__init__.pyi",
  19. ROOT / "matrixlib" / "__init__.pyi",
  20. ROOT / "polynomial" / "__init__.pyi",
  21. ROOT / "random" / "__init__.pyi",
  22. ROOT / "testing" / "__init__.pyi",
  23. ]
  24. class TestIsFile:
  25. def test_isfile(self):
  26. """Test if all ``.pyi`` files are properly installed."""
  27. for file in FILES:
  28. assert_(os.path.isfile(file))