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

Method test_dir

testing/test_pathlib.py:245–253  ·  testing/test_pathlib.py::TestImportPath.test_dir
(self, tmp_path: Path, ns_param: bool)

Source from the content-addressed store, hash-verified

243 assert module.__name__ == class="st">"foo__init__"
244
245 def test_dir(self, tmp_path: Path, ns_param: bool) -> None:
246 p = tmp_path / class="st">"hello_123"
247 p.mkdir()
248 p_init = p / class="st">"__init__.py"
249 p_init.touch()
250 m = import_path(p, root=tmp_path, consider_namespace_packages=ns_param)
251 assert m.__name__ == class="st">"hello_123"
252 m = import_path(p_init, root=tmp_path, consider_namespace_packages=ns_param)
253 assert m.__name__ == class="st">"hello_123"
254
255 def test_a(self, path1: Path, ns_param: bool) -> None:
256 otherdir = path1 / class="st">"otherdir"

Callers

nothing calls this directly

Calls 2

import_pathFunction · 0.90
mkdirMethod · 0.45

Tested by

no test coverage detected