From 03eb9203fde9393d558e66e0f34c7f379ad8eeec Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Mon, 30 May 2016 14:41:00 +0200 Subject: [PATCH] remove the old empty argument triggers unlike the marker based one its not composable --- _pytest/python.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/_pytest/python.py b/_pytest/python.py index 05ffd673f..aaca2b240 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -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)