Replies: 1 comment 1 reply
-
I think the following code should be the effect you want to achieve, here I use pytest.fixture for parameterization. import pytest
def create_something_from(args):
return args
@pytest.fixture(params=[1, 2, 3])
def fixture_obj(request):
return create_something_from(request.param)
def test_demo(fixture_obj):
print("\n", fixture_obj) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Imagine I have this:
How can I make this:
create_something_from
runs before the creation of the fixture?Beta Was this translation helpful? Give feedback.
All reactions