Merged in markon/pytest (pull request #66)

Fix @parametrize.
This commit is contained in:
holger krekel 2013-08-16 11:38:00 +02:00
commit 4800aeaef7
1 changed files with 26 additions and 0 deletions

View File

@ -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