Add testcase for #2819

This commit is contained in:
Leonard Lausen 2017-10-09 01:02:54 +09:00
parent e89abe6a40
commit e86ba41a32
1 changed files with 18 additions and 0 deletions

View File

@ -342,6 +342,24 @@ def test_parametrized_collect_with_wrong_args(testdir):
])
def test_parametrized_with_kwargs(testdir):
"""Test collect parametrized func with wrong number of args."""
py_file = testdir.makepyfile("""
import pytest
@pytest.fixture(params=[1,2])
def a(request):
return request.param
@pytest.mark.parametrize(argnames='b', argvalues=[1, 2])
def test_func(a, b):
pass
""")
result = testdir.runpytest(py_file)
assert(result.ret == 0)
class TestFunctional(object):
def test_mark_per_function(self, testdir):