3 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/c88e134bf30d/ Changeset: c88e134bf30d User: markon Date: 2013-08-15 12:52:34 Summary: Fix @parametrize when using an integer and strings as parameters in a test accepting a parameter and a fixture as arguments. Affected #: 1 file
diff -r ffcbf3e090c24239ab12a092c929fcecdfe49369 -r c88e134bf30d6a84d97d7d636936b2d221be4a34 testing/test_parametrize_with_fixture.py --- /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 https://bitbucket.org/hpk42/pytest/commits/d968e0aa0478/ Changeset: d968e0aa0478 User: markon Date: 2013-08-16 09:55:25 Summary: test marked as Affected #: 1 file diff -r c88e134bf30d6a84d97d7d636936b2d221be4a34 -r d968e0aa0478d4df45592d8a0e2db8547399f475 testing/test_parametrize_with_fixture.py --- a/testing/test_parametrize_with_fixture.py +++ b/testing/test_parametrize_with_fixture.py @@ -1,5 +1,7 @@ +import pytest +@pytest.mark.xfail() def test_parametrize(testdir): testdir.makepyfile(""" import pytest https://bitbucket.org/hpk42/pytest/commits/78b7645e66c6/ Changeset: 78b7645e66c6 User: hpk42 Date: 2013-08-16 11:38:00 Summary: Merged in markon/pytest (pull request #66) Fix @parametrize. Affected #: 1 file diff -r 2393d3dcacdf411a855acaac836bae027d72a668 -r 78b7645e66c65118439b59d9b677e7ec71a05f8c testing/test_parametrize_with_fixture.py --- /dev/null +++ b/testing/test_parametrize_with_fixture.py @@ -0,0 +1,26 @@ +import pytest + + +@pytest.mark.xfail() +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 Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ pytest-commit mailing list pytest-commit@python.org http://mail.python.org/mailman/listinfo/pytest-commit