-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributortopic: collectionrelated to the collection phaserelated to the collection phasetopic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrize
Description
This:
import pytest
@pytest.mark.parametrize('foo, bar', [(1, 2, 3)])
def test_foo(foo, bar):
passgives us:
../proj/pytest/_pytest/runner.py:157: in __init__
self.result = func()
../proj/pytest/_pytest/runner.py:328: in <lambda>
lambda: list(collector.collect()),
../proj/pytest/_pytest/python.py:402: in collect
return super(Module, self).collect()
../proj/pytest/_pytest/python.py:314: in collect
res = self.makeitem(name, obj)
../proj/pytest/_pytest/python.py:326: in makeitem
collector=self, name=name, obj=obj)
../proj/pytest/_pytest/vendored_packages/pluggy.py:745: in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
../proj/pytest/_pytest/vendored_packages/pluggy.py:339: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
../proj/pytest/_pytest/vendored_packages/pluggy.py:334: in <lambda>
_MultiCall(methods, kwargs, hook.spec_opts).execute()
../proj/pytest/_pytest/vendored_packages/pluggy.py:613: in execute
return _wrapped_call(hook_impl.function(*args), self.execute)
../proj/pytest/_pytest/vendored_packages/pluggy.py:250: in _wrapped_call
wrap_controller.send(call_outcome)
../proj/pytest/_pytest/python.py:185: in pytest_pycollect_makeitem
res = list(collector._genfunctions(name, obj))
../proj/pytest/_pytest/python.py:346: in _genfunctions
self.ihook.pytest_generate_tests(metafunc=metafunc)
../proj/pytest/_pytest/vendored_packages/pluggy.py:745: in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
../proj/pytest/_pytest/vendored_packages/pluggy.py:339: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
../proj/pytest/_pytest/vendored_packages/pluggy.py:334: in <lambda>
_MultiCall(methods, kwargs, hook.spec_opts).execute()
../proj/pytest/_pytest/vendored_packages/pluggy.py:614: in execute
res = hook_impl.function(*args)
../proj/pytest/_pytest/python.py:112: in pytest_generate_tests
metafunc.parametrize(*marker.args, **marker.kwargs)
../proj/pytest/_pytest/python.py:846: in parametrize
assert len(param.values) == len(argnames)
E AssertionError
it'd be nice to show a proper error message instead.
Metadata
Metadata
Assignees
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributortopic: collectionrelated to the collection phaserelated to the collection phasetopic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrize