remove the old empty argument triggers
unlike the marker based one its not composable
This commit is contained in:
parent
ae4dff0e0a
commit
03eb9203fd
|
@ -871,8 +871,6 @@ class CallSpec2(object):
|
|||
getattr(self, valtype_for_arg)[arg] = val
|
||||
self.indices[arg] = param_index
|
||||
self._arg2scopenum[arg] = scopenum
|
||||
if val is _notexists:
|
||||
self._emptyparamspecified = True
|
||||
self._idlist.append(id)
|
||||
self.keywords.update(keywords)
|
||||
|
||||
|
@ -992,8 +990,10 @@ class Metafunc(FuncargnamesCompatAttr):
|
|||
argvalues = [(_notexists,) * len(argnames)]
|
||||
# we passed a empty list to parameterize, skip that test
|
||||
#
|
||||
fs, lineno = getfslineno(self.function)
|
||||
newmark = pytest.mark.skip(
|
||||
reason='argument listing for %r was empty' % argnames)
|
||||
reason="got empty parameter set, function %s at %s:%d" % (
|
||||
self.function.__name__, fs, lineno))
|
||||
newmarks = newkeywords.setdefault(0, {})
|
||||
newmarks[newmark.markname] = newmark
|
||||
|
||||
|
@ -1415,15 +1415,6 @@ class Function(FunctionMixin, pytest.Item, FuncargnamesCompatAttr):
|
|||
self.ihook.pytest_pyfunc_call(pyfuncitem=self)
|
||||
|
||||
def setup(self):
|
||||
# check if parametrization happend with an empty list
|
||||
try:
|
||||
self.callspec._emptyparamspecified
|
||||
except AttributeError:
|
||||
pass
|
||||
else:
|
||||
fs, lineno = self._getfslineno()
|
||||
pytest.skip("got empty parameter set, function %s at %s:%d" %(
|
||||
self.function.__name__, fs, lineno))
|
||||
super(Function, self).setup()
|
||||
fillfixtures(self)
|
||||
|
||||
|
|
Loading…
Reference in New Issue