-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to provide mark with fixture params #3351
Comments
you can use the same mechanism used for parameterize ideally |
@RonnyPfannschmidt is correct, a quick example: import pytest
@pytest.fixture(params=[1, pytest.param(2, marks=pytest.mark.slow)])
def fix(request):
return request.param
def test_f(fix):
pass
|
Noticed there was nothing about that on the docs: #3353 I'm closing this for now @cauveryguda since your question has been answered, but feel free to follow with more. |
Thank you for the answers. Sorry for some reason I have been searching for this and could not find in the documentation. I will give a try for this and keep posted if any issues. -Cauvery. |
Currently I don't see and did not find any documentation on a way to provide mark for the params given in fixtures.
For example I have a fixture with 3 params and I would like the test you use only some of the params for test run depending on the -m option given on command. I don't think currently the marks are supported at fixture param level.
FYI I am using mark at the test level parameterize, so looking for something similar at the fixture level param.
Thank you,
Cauvery.
The text was updated successfully, but these errors were encountered: