refactor resolve_arg_value_types

* more explicit type checks
* expand from list+tuple to sequence
This commit is contained in:
Ronny Pfannschmidt
2019-07-12 17:47:52 +02:00
parent 898028cb22
commit 2c071a060e
2 changed files with 24 additions and 8 deletions

View File

@@ -599,6 +599,17 @@ class TestMetafunc:
assert metafunc._calls[0].funcargs == dict(x="a", y="b")
assert metafunc._calls[0].params == {}
def test_parametrize_indirect_wrong_type(self):
def func(x, y):
pass
metafunc = self.Metafunc(func)
with pytest.raises(
pytest.fail.Exception,
match="In func: expected Sequence or boolean for indirect, got dict",
):
metafunc.parametrize("x, y", [("a", "b")], indirect={})
def test_parametrize_indirect_list_functional(self, testdir):
"""
#714