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

Method get_collected_names

testing/test_mark.py:966–970  ·  view source on GitHub ↗
(*args: str)

Source from the content-addressed store, hash-verified

964 monkeypatch.chdir(pytester.path / "suite")
965
966 def get_collected_names(*args: str) -> list[str]:
967 _, rec = pytester.inline_genitems(*args)
968 calls = rec.getcalls("pytest_collection_finish")
969 assert len(calls) == 1
970 return [x.name for x in calls[0].session.items]
971
972 # sanity check: collect both tests in normal runs
973 assert get_collected_names() == ["test_aaa", "test_ddd"]

Callers

nothing calls this directly

Calls 2

getcallsMethod · 0.80
inline_genitemsMethod · 0.45

Tested by

no test coverage detected