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

Function test_fixturerequest_getmodulepath

testing/test_legacypath.py:94–100  ·  view source on GitHub ↗
(pytester: pytest.Pytester)

Source from the content-addressed store, hash-verified

92
93
94def test_fixturerequest_getmodulepath(pytester: pytest.Pytester) -> None:
95 modcol = pytester.getmodulecol("def test_somefunc(): pass")
96 (item,) = pytester.genitems([modcol])
97 assert isinstance(item, pytest.Function)
98 req = TopRequest(item, _ispytest=True)
99 assert req.path == modcol.path
100 assert req.fspath == modcol.fspath # type: ignore[attr-defined]
101
102
103class TestFixtureRequestSessionScoped:

Callers

nothing calls this directly

Calls 3

TopRequestClass · 0.90
getmodulecolMethod · 0.45
genitemsMethod · 0.45

Tested by

no test coverage detected