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

Method invocation_path

testing/test_main.py:110–118  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

108class TestResolveCollectionArgument:
109 @pytest.fixture
110 def invocation_path(self, pytester: Pytester) -> Path:
111 pytester.syspathinsert(pytester.path / "src")
112 pytester.chdir()
113
114 pkg = pytester.path.joinpath("src/pkg")
115 pkg.mkdir(parents=True)
116 pkg.joinpath("__init__.py").touch()
117 pkg.joinpath("test.py").touch()
118 return pytester.path
119
120 def test_file(self, invocation_path: Path) -> None:
121 """File and parts."""

Callers

nothing calls this directly

Calls 3

syspathinsertMethod · 0.45
chdirMethod · 0.45
mkdirMethod · 0.45

Tested by

no test coverage detected