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

Function test_item_fspath

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

Source from the content-addressed store, hash-verified

7
8
9def test_item_fspath(pytester: pytest.Pytester) -> None:
10 pytester.makepyfile("def test_func(): pass")
11 items, hookrec = pytester.inline_genitems()
12 assert len(items) == 1
13 (item,) = items
14 items2, hookrec = pytester.inline_genitems(item.nodeid)
15 (item2,) = items2
16 assert item2.name == item.name
17 assert item2.fspath == item.fspath # type: ignore[attr-defined]
18 assert item2.path == item.path
19
20
21def test_testdir_testtmproot(testdir: Testdir) -> None:

Callers

nothing calls this directly

Calls 2

makepyfileMethod · 0.45
inline_genitemsMethod · 0.45

Tested by

no test coverage detected