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

Method pytest_collection_finish

src/_pytest/fixtures.py:1821–1829  ·  view source on GitHub ↗

Clean up any conftests that were never collected by a Directory. After __init__ flushes above-rootdir conftests and collection pops under-rootdir ones, remaining entries mean collection was interrupted (e.g. UsageError for a bad path). These conftests' fixtures aren't

(self)

Source from the content-addressed store, hash-verified

1819 self.parsefactories(holder=plugin, node=session)
1820
1821 def pytest_collection_finish(self) -> None:
1822 """Clean up any conftests that were never collected by a Directory.
1823
1824 After __init__ flushes above-rootdir conftests and collection pops
1825 under-rootdir ones, remaining entries mean collection was interrupted
1826 (e.g. UsageError for a bad path). These conftests' fixtures aren't
1827 needed since their directories' tests weren't collected either.
1828 """
1829 self._pending_conftests.clear()
1830
1831 def _getautousenames(self, node: nodes.Node) -> Iterator[str]:
1832 """Return the names of autouse fixtures applicable to node."""

Callers 1

perform_collectMethod · 0.45

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected