MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_resolve_package_path

Function test_resolve_package_path

testing/test_pathlib.py:315–322  ·  view source on GitHub ↗
(tmp_path: Path)

Source from the content-addressed store, hash-verified

313
314
315def test_resolve_package_path(tmp_path: Path) -> None:
316 pkg = tmp_path / "pkg1"
317 pkg.mkdir()
318 (pkg / "__init__.py").touch()
319 (pkg / "subdir").mkdir()
320 (pkg / "subdir/__init__.py").touch()
321 assert resolve_package_path(pkg) == pkg
322 assert resolve_package_path(pkg.joinpath("subdir", "__init__.py")) == pkg
323
324
325def test_package_unimportable(tmp_path: Path) -> None:

Callers

nothing calls this directly

Calls 2

resolve_package_pathFunction · 0.90
mkdirMethod · 0.45

Tested by

no test coverage detected