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! |
Answered by
nicoddemus
Jun 16, 2025
Replies: 2 comments
|
I believe the only way to not show them at all is to implement |
0 replies
Answer selected by
ego-thales
|
Great pointer, thank you! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe the only way to not show them at all is to implement
pytest_collection_modifyitemsand exclude the test items.