no longer check if indirect metafunc.parametrize params are funcarg names

This commit is contained in:
Ronny Pfannschmidt
2012-02-03 16:54:00 +01:00
parent 87b8769680
commit 2ca6d9f039
3 changed files with 9 additions and 5 deletions

View File

@@ -629,9 +629,11 @@ class Metafunc:
if not isinstance(argnames, (tuple, list)):
argnames = (argnames,)
argvalues = [(val,) for val in argvalues]
for arg in argnames:
if arg not in self.funcargnames:
raise ValueError("%r has no argument %r" %(self.function, arg))
if not indirect:
#XXX should we also check for the opposite case?
for arg in argnames:
if arg not in self.funcargnames:
raise ValueError("%r has no argument %r" %(self.function, arg))
valtype = indirect and "params" or "funcargs"
if not ids:
idmaker = IDMaker()