diff --git a/testing/test_parametrize_with_fixture.py b/testing/test_parametrize_with_fixture.py new file mode 100644 index 000000000..ce35ce410 --- /dev/null +++ b/testing/test_parametrize_with_fixture.py @@ -0,0 +1,24 @@ + + +def test_parametrize(testdir): + testdir.makepyfile(""" + import pytest + + @pytest.fixture + def myfixture(): + return 'example' + + + @pytest.mark.parametrize( + 'limit', + ( + 0, + '0', + 'foo', + ) + ) + def test_limit(limit, myfixture): + return + """) + reprec = testdir.runpytest() + assert 'KeyError' in reprec.stdout