-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
I noticed that fixtures (while in an array) don't behave the same in parameterize. Is it possible to put fixtures into arrays for parameterize? If so, how?
@pytest.fixture(scope="class")
def fix_a() -> int:
return 123
@pytest.fixture(scope="class")
def fix_b() -> int:
return 456
@pytest.fixture(scope="class")
def fix_c() -> int:
return 789
@pytest.fixture(scope="class")
def fix_d() -> int:
return 345
class TestSample:
@pytest_cases.parametrize("exp,tup", [
( 123, (fix_a, fix_c)),
( 456, (fix_b, fix_d)),
])
def test_func(self, exp, tup):
assert tup[0] == expAssertionError: assert <pytest_fixture(<function fix_b at 0x10738df30>)> == 456
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels