fix #510 by adding a describing skip marker on empty parameterize

This commit is contained in:
Ronny Pfannschmidt
2016-04-21 20:57:53 +02:00
parent 436e13ac25
commit d217b52508
3 changed files with 28 additions and 13 deletions

View File

@@ -109,6 +109,13 @@ class TestMetafunc:
metafunc.parametrize(("x","y"), [("abc", "def"),
("ghi", "jkl")], ids=["one"]))
@pytest.mark.issue510
def test_parametrize_empty_list(self):
def func( y): pass
metafunc = self.Metafunc(func)
metafunc.parametrize("y", [])
assert 'skip' in metafunc._calls[0].keywords
def test_parametrize_with_userobjects(self):
def func(x, y): pass
metafunc = self.Metafunc(func)