Is it possible to parametrize a test with fixtures?
问题 I would like to pass @pytest.mark.parametrize not particular values but fixtures. Like so. Given a conftest with: @pytest.fixture def name1(): return 'foo' @pytest.fixture def name2(): return 'bar' within my test.py this works of course: @pytest.mark.parametrize('name', ['foo', 'bar', 'baz']) def test_name(name): print(name) This does not: @pytest.mark.parametrize('name', [name1, name2]) def test_name(name): print(name) I am aware that in this trivial case I could just create one name fixture