MCPcopy Create free account
hub / github.com/tox-dev/filelock / pytest_collection_modifyitems

Function pytest_collection_modifyitems

tests/conftest.py:71–77  ·  view source on GitHub ↗
(items: list[pytest.Item])

Source from the content-addressed store, hash-verified

69
70
71def pytest_collection_modifyitems(items: list[pytest.Item]) -> None:
72 # Termux builds can omit os.link. Fallback tests still run there.
73 if not hasattr(os, "link"): # pragma: no cover # the body runs only on Termux/Android, absent from the CI matrix
74 skip = pytest.mark.skip(reason="test requires os.link (hard links), absent on Termux/Android")
75 for item in items:
76 if item.get_closest_marker("requires_hard_links") is not None:
77 item.add_marker(skip)
78
79
80# Captured at import, before any test forks, so a fork child can tell it is not the session.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected