Skip tests entirely (not show "skipped")? #13523
-
Hello, I'm looking for a way to skip tests entirely because it does not make sense to run them at all. Let me provide an example. # conftest.py
@fixture(scope="session", params=["modeA", "modeB"])
def mode(request):
return request.param
@fixture
def my_fixture(mode):
"""Depends on ``mode``, may be complex."""
... # test_file.py
def test_func_in_modeA(my_fixture):
"""I only want to test ``func`` in mode A."""
... If I use Is it possible at all? I'm not sure whether the Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I believe the only way to not show them at all is to implement |
Beta Was this translation helpful? Give feedback.
-
Great pointer, thank you! |
Beta Was this translation helpful? Give feedback.
I believe the only way to not show them at all is to implement
pytest_collection_modifyitems
and exclude the test items.