-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
In pytest's vanilla parametrization API, it's possible to mark individual cases with markers like skip or xfail using pytest.param(..., marks=...), e.g. (adapted from the example in the official docs):
@pytest.mark.parametrize(
("a", "b"),
[
(1, 2),
(3, 4),
pytest.param(
(5, 6), marks=pytest.mark.xfail(reason="doesn't work yet")
),
],
)
def test_something(a, b):
...Is something like that possible with pytest-parametrization as well?
It doesn't look like it to me (I could be wrong), but IMHO this would be a useful feature to have. If you're fine with introducing an extra reserved keyword argument, the most ergonomic API would probably be to have the marks parameter be part of Parametrization.case's signature, but other options would also be possible (e.g. mirroring pytest's API of treating a single pytest.param argument differently).
Metadata
Metadata
Assignees
Labels
No labels