Define a pytest fixture providing multiple arguments to test function
问题 With pytest, I can define a fixture like so: @pytest.fixture def foo(): return "blah" And use it in a test like so: def test_blah(foo): assert foo == "blah" That's all very well. But what I want to do is define a single fixture function that "expands" to provide multiple arguments to a test function. Something like this: @pytest.multifixture("foo,bar") def foobar(): return "blah", "whatever" def test_stuff(foo, bar): assert foo == "blah" and bar == "whatever" I want to define the two objects