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

Method test_messy_name

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

Source from the content-addressed store, hash-verified

164 import_path(tmp_path.joinpath("b", "test_x123.py"), root=tmp_path)
165
166 def test_messy_name(self, tmp_path: Path) -> None:
167 # https://bitbucket.org/hpk42/py-trunk/issue/129
168 path = tmp_path / "foo__init__.py"
169 path.touch()
170 module = import_path(path, root=tmp_path)
171 assert module.__name__ == "foo__init__"
172
173 def test_dir(self, tmp_path: Path) -> None:
174 p = tmp_path / "hello_123"

Callers

nothing calls this directly

Calls 1

import_pathFunction · 0.90

Tested by

no test coverage detected