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

Method testdir

src/_pytest/legacypath.py:260–267  ·  view source on GitHub ↗

Identical to :fixture:`pytester`, and provides an instance whose methods return legacy ``LEGACY_PATH`` objects instead when applicable. New code should avoid using :fixture:`testdir` in favor of :fixture:`pytester`.

(pytester: Pytester)

Source from the content-addressed store, hash-verified

258 @staticmethod
259 @fixture
260 def testdir(pytester: Pytester) -> Testdir:
261 """
262 Identical to :fixture:`pytester`, and provides an instance whose methods return
263 legacy ``LEGACY_PATH`` objects instead when applicable.
264
265 New code should avoid using :fixture:`testdir` in favor of :fixture:`pytester`.
266 """
267 return Testdir(pytester, _ispytest=True)
268
269
270@final

Callers

nothing calls this directly

Calls 1

TestdirClass · 0.85

Tested by

no test coverage detected