If you're fixture isn't parameterized (always returns the same value) and you sometimes need multiple "instances" (assuming it's an object) of that, you could use the "factory as fixture" pattern described here. It's similar to what @Sergei Voronezhskii suggested, but you can even pass the needed quantity as an argument and you don't need a dummy class:
@pytest.fixture
def make_user():
def _make_user(quantity):
return [User() for _ in range(quantity)]
return _make_user # return the function, so don't write '()'
# the parametrize part is optional, just for illustration purposes
@pytest.mark.parametrize("quantity", list(range(5))
def test_make_user(quantity, make_user):
assert len(make_user(quantity) == quantity
Now if your fixture itself is parameterized (using 'pytest.fixture(params=...)') and you want all combinations of two values (the Cartesion product), then this will not work and you're better off using @danijar's answer. You could also define another fixture 'double_X' that requests 'first' and 'second' and make your test function request 'double_X'. Depending on your use case this could be more or less verbose than requesting the two fixtures directly at your test function(s).
Whether you parametrize at your fixture, your test or the function body level (creating for loops...) depends on what parts you'll reuse I guess. So there isn't a clear cut answer, at least not one I found after digging through the fixtures docs for some hours.