Always report error about parametrize data that doesn't correspond to fixtures in test functions.

This commit is contained in:
elizabeth
2015-08-23 13:42:40 +03:00
parent f7bacd169e
commit 06585f5bdd
2 changed files with 6 additions and 8 deletions
+2 -3
View File
@@ -214,12 +214,11 @@ class TestMetafunc:
metafunc = self.Metafunc(func)
metafunc.parametrize('x', [1], indirect=True)
metafunc.parametrize('y', [2,3], indirect=True)
metafunc.parametrize('unnamed', [1], indirect=True)
assert len(metafunc._calls) == 2
assert metafunc._calls[0].funcargs == {}
assert metafunc._calls[1].funcargs == {}
assert metafunc._calls[0].params == dict(x=1,y=2, unnamed=1)
assert metafunc._calls[1].params == dict(x=1,y=3, unnamed=1)
assert metafunc._calls[0].params == dict(x=1,y=2)
assert metafunc._calls[1].params == dict(x=1,y=3)
@pytest.mark.issue714
def test_parametrize_indirect_list(self):