MCPcopy
hub / github.com/pytest-dev/pytest / test_compute_module_name

Function test_compute_module_name

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

Source from the content-addressed store, hash-verified

1723
1724
1725def test_compute_module_name(tmp_path: Path) -> None:
1726 assert compute_module_name(tmp_path, tmp_path) is None
1727 assert compute_module_name(Path(), Path()) is None
1728
1729 assert compute_module_name(tmp_path, tmp_path / "mod.py") == "mod"
1730 assert compute_module_name(tmp_path, tmp_path / "src/app/bar") == "src.app.bar"
1731 assert compute_module_name(tmp_path, tmp_path / "src/app/bar.py") == "src.app.bar"
1732 assert (
1733 compute_module_name(tmp_path, tmp_path / "src/app/bar/__init__.py")
1734 == "src.app.bar"
1735 )
1736
1737
1738def validate_namespace_package(

Callers

nothing calls this directly

Calls 1

compute_module_nameFunction · 0.90

Tested by

no test coverage detected