Моя цель - пометить @pytest.mark.skip
тесты, которые параметризованы заданным значением.
Пример теста:
@pytest.mark.parametrize('param', [value_not_to_filter, value_to_filter])
def test_example(param):
...
Я бы хотел отфильтровать тесты в pytest_collection_modifyitems
из conftest.py
:
def pytest_collection_modifyitems(config, items):
for item in items:
if value_to_filter in item.params: # this line is pseudocode, I'm looking for way to check if item was parametrized by some value
item.add_marker(pytest.mark.skip(reason='some reason'))