MCPcopy Create free account
hub / github.com/dateutil/dateutil / pytest_collection_modifyitems

Function pytest_collection_modifyitems

tests/conftest.py:13–20  ·  view source on GitHub ↗
(items)

Source from the content-addressed store, hash-verified

11# Configure pytest to ignore xfailing tests
12# See: https://stackoverflow.com/a/53198349/467366
13def pytest_collection_modifyitems(items):
14 for item in items:
15 marker = item.get_closest_marker("xfail")
16
17 # Need to query the args because conditional xfail tests still have
18 # the xfail mark even if they are not expected to fail
19 if marker and (not marker.args or marker.args[0]):
20 item.add_marker(pytest.mark.no_cover)
21
22
23@pytest.fixture(params=TZ_SOURCES)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected