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

Method test_dir

testing/test_pathlib.py:173–181  ·  view source on GitHub ↗
(self, tmp_path: Path)

Source from the content-addressed store, hash-verified

171 assert module.__name__ == "foo__init__"
172
173 def test_dir(self, tmp_path: Path) -> None:
174 p = tmp_path / "hello_123"
175 p.mkdir()
176 p_init = p / "__init__.py"
177 p_init.touch()
178 m = import_path(p, root=tmp_path)
179 assert m.__name__ == "hello_123"
180 m = import_path(p_init, root=tmp_path)
181 assert m.__name__ == "hello_123"
182
183 def test_a(self, path1: Path) -> None:
184 otherdir = path1 / "otherdir"

Callers

nothing calls this directly

Calls 2

import_pathFunction · 0.90
mkdirMethod · 0.45

Tested by

no test coverage detected