You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a standard parametrize decorator while pytest_cases is installed, seems to cause these tests to become broken.
If I uninstall pytest_cases I am able to collect the test and run it, successufully.
I am attaching a very simple example to reproduce it.
../../../.env/local/lib/python2.7/site-packages/pluggy/hooks.py:286: in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
../../../.env/local/lib/python2.7/site-packages/pluggy/manager.py:92: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
../../../.env/local/lib/python2.7/site-packages/pluggy/manager.py:86: in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
../../../.env/local/lib/python2.7/site-packages/_pytest/python.py:234: in pytest_pycollect_makeitem
res = list(collector._genfunctions(name, obj))
../../../.env/local/lib/python2.7/site-packages/_pytest/python.py:394: in _genfunctions
definition = FunctionDefinition(name=name, parent=self, callobj=funcobj)
../../../.env/local/lib/python2.7/site-packages/_pytest/python.py:1429: in __init__
self, self.obj, self.cls, funcargs=True
../../../.env/local/lib/python2.7/site-packages/_pytest/fixtures.py:1163: in getfixtureinfo
initialnames, node, ignore_args=self._get_direct_parametrize_args(node)
../../../.env/local/lib/python2.7/site-packages/pytest_cases/plugin.py:510: in getfixtureclosure
sorted_fixturenames = sort_according_to_ref_list(fixturenames, param_names)
../../../.env/local/lib/python2.7/site-packages/pytest_cases/plugin.py:978: in sort_according_to_ref_list
cur_indices.append(fixturenames.index(pname))
E ValueError: tuple.index(x): x not in tuple
The text was updated successfully, but these errors were encountered:
Thanks for reporting this ! it is a python-2 only issue apparently, due to the fact that at some point I do isinstance(argnames, str) and this returns false when argnames is a python 2 string.
When using a standard parametrize decorator while pytest_cases is installed, seems to cause these tests to become broken.
If I uninstall
pytest_cases
I am able to collect the test and run it, successufully.I am attaching a very simple example to reproduce it.
I am using the following versions:
$ pip freeze | grep -i pytest
Leads to the following output:
The text was updated successfully, but these errors were encountered: