(self, tmp_path: Path)
| 242 | assert issubclass(ImportPathMismatchError, ImportError) |
| 243 | |
| 244 | def test_issue131_on__init__(self, tmp_path: Path) -> None: |
| 245 | # __init__.py files may be namespace packages, and thus the |
| 246 | # __file__ of an imported module may not be ourselves |
| 247 | # see issue |
| 248 | tmp_path.joinpath("proja").mkdir() |
| 249 | p1 = tmp_path.joinpath("proja", "__init__.py") |
| 250 | p1.touch() |
| 251 | tmp_path.joinpath("sub", "proja").mkdir(parents=True) |
| 252 | p2 = tmp_path.joinpath("sub", "proja", "__init__.py") |
| 253 | p2.touch() |
| 254 | m1 = import_path(p1, root=tmp_path) |
| 255 | m2 = import_path(p2, root=tmp_path) |
| 256 | assert m1 == m2 |
| 257 | |
| 258 | def test_ensuresyspath_append(self, tmp_path: Path) -> None: |
| 259 | root1 = tmp_path / "root1" |
nothing calls this directly
no test coverage detected