Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Add docs to newly added pytest hook
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Mar 25, 2022
1 parent 3cab51d commit e6312ec
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@
def pytest_collection_modifyitems(
session: pytest.Session, config: pytest.Config, items: List[pytest.Item]
):
"""
This hook is called after collection has been performed, and can be used to
modify the list of items that will be run.
See `pytest documentation <https://docs.pytest.org/en/latest/reference/reference.html#std-hook-pytest_collection_modifyitems>`_.
"""
skip_as_false_positive = pytest.mark.skip(
reason="Skipping this because its not a pytest test but an ordinary method that happens to start with 'test_'"
reason="Skipping this because its not a pytest test but an ordinary"
+ "method that happens to start with 'test_'"
)
for item in items:
# Add a mark to all tests that should be skipped
if item.name in [
"test_relation_maxima",
"test_b2_local",
Expand Down

0 comments on commit e6312ec

Please sign in to comment.