Skip to content

Instantly share code, notes, and snippets.

@mattip
Last active September 17, 2018 10:22
Show Gist options
  • Save mattip/d8d8c7b2bca3bfa8f8e44b18dfd42dd4 to your computer and use it in GitHub Desktop.
Save mattip/d8d8c7b2bca3bfa8f8e44b18dfd42dd4 to your computer and use it in GitHub Desktop.
f2py tests with a fixture fails to collect
platform linux -- Python 3.6.5, pytest-3.6.3, py-1.5.4, pluggy-0.6.0 -- /home/matti/cpython3_virt/bin/python
cachedir: ../../../../../.pytest_cache
benchmark: 3.1.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/matti/pypy_stuff/numpy2, inifile: pytest.ini
plugins: cov-2.5.1, benchmark-3.1.1
collected 5301 items / 1 errors / 167 deselected
===================================================================================== ERRORS =====================================================================================
______________________________________ ERROR collecting build/testenv/lib/python3.6/site-packages/numpy/f2py/tests/test_array_from_pyobj.py ______________________________________
../../../../../../cpython3_virt/lib/python3.6/site-packages/pluggy/__init__.py:617: in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
../../../../../../cpython3_virt/lib/python3.6/site-packages/pluggy/__init__.py:222: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
../../../../../../cpython3_virt/lib/python3.6/site-packages/pluggy/__init__.py:216: in <lambda>
firstresult=hook.spec_opts.get('firstresult'),
../../../../../../cpython3_virt/lib/python3.6/site-packages/_pytest/python.py:243: in pytest_pycollect_makeitem
res = list(collector._genfunctions(name, obj))
../../../../../../cpython3_virt/lib/python3.6/site-packages/_pytest/python.py:433: in _genfunctions
self.ihook.pytest_generate_tests(metafunc=metafunc)
../../../../../../cpython3_virt/lib/python3.6/site-packages/pluggy/__init__.py:617: in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
../../../../../../cpython3_virt/lib/python3.6/site-packages/pluggy/__init__.py:222: in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
../../../../../../cpython3_virt/lib/python3.6/site-packages/pluggy/__init__.py:216: in <lambda>
firstresult=hook.spec_opts.get('firstresult'),
../../../../../../cpython3_virt/lib/python3.6/site-packages/_pytest/fixtures.py:1135: in pytest_generate_tests
ids=fixturedef.ids,
../../../../../../cpython3_virt/lib/python3.6/site-packages/_pytest/python.py:943: in parametrize
param_index,
../../../../../../cpython3_virt/lib/python3.6/site-packages/_pytest/python.py:774: in setmulti2
self._checkargnotcontained(arg)
../../../../../../cpython3_virt/lib/python3.6/site-packages/_pytest/python.py:758: in _checkargnotcontained
raise ValueError("duplicate %r" % (arg,))
E ValueError: duplicate 'class_fixture'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================================== 167 deselected, 1 error in 3.12 seconds =====================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment