Open ChristianF88 opened 2 years ago
So it seems like I am not the only one in demand of this feature. Any plans on whether that could be implemented at some point?
+1 for this feature request
I found this issue while looking for something else. It isn't what I'm looking for, but now I'm curious by your problem. You want the fixture to be the list of parameters? I think normally you would do the parametrization on the fixture itself and then use that fixture in the test function. This is kind of shown in the README of this project:
import pytest
from pytest_lazyfixture import lazy_fixture
@pytest.fixture(params=[1, 2])
def one(request):
return request.param
@pytest.mark.parametrize('arg1,arg2', [
('val1', lazy_fixture('one')),
])
def test_func(arg1, arg2):
assert arg2 in [1, 2]
But also talked about in the pytest docs here:
https://docs.pytest.org/en/6.2.x/fixture.html#parametrizing-fixtures
Hi there,
I am running into issues with using a fixture, that loads a list of parameters that I want to use to parametrize tests. I am not sure, whether that is something, that can be done with your package and I just can't figure it out, or whether that would be a new feature.
Here is a example on what I want to achieve:
Do you have an idea on how to get my code running?
Thanks a lot!