Skip to content

Commit

Permalink
Add testcase for #2819
Browse files Browse the repository at this point in the history
  • Loading branch information
leezu committed Oct 8, 2017
1 parent e89abe6 commit e86ba41
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions testing/test_mark.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,24 @@ def test_func(foo, bar):
])


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):
Expand Down

0 comments on commit e86ba41

Please sign in to comment.