allow to specify parametrize inputs as a comma-separated string

add Wouter to changelog and to authors
This commit is contained in:
holger krekel
2013-05-28 10:32:54 +02:00
parent bc5a5a63f2
commit c294a417bd
7 changed files with 71 additions and 27 deletions

View File

@@ -221,6 +221,16 @@ class TestMetafunc:
"*6 fail*",
])
def test_parametrize_CSV(self, testdir):
testdir.makepyfile("""
import pytest
@pytest.mark.parametrize("x, y,", [(1,2), (2,3)])
def test_func(x, y):
assert x+1 == y
""")
reprec = testdir.inline_run()
reprec.assertoutcome(passed=2)
def test_parametrize_class_scenarios(self, testdir):
testdir.makepyfile("""
# same as doc/en/example/parametrize scenario example