(items)
| 5 | # Configure pytest to ignore xfailing tests |
| 6 | # See: https://stackoverflow.com/a/53198349/467366 |
| 7 | def pytest_collection_modifyitems(items): |
| 8 | for item in items: |
| 9 | marker_getter = getattr(item, 'get_closest_marker', None) |
| 10 | |
| 11 | # Python 3.3 support |
| 12 | if marker_getter is None: |
| 13 | marker_getter = item.get_marker |
| 14 | |
| 15 | marker = marker_getter('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 | def set_tzpath(): |
nothing calls this directly
no outgoing calls
no test coverage detected