Skip to content
  • Matias Guijarro's avatar
    tests: moved 'addoption' code to the main conftest.py to work around a weird pytest error · 434ef421
    Matias Guijarro authored
    Error stack trace is pasted below:
    
    collecting ... INTERNALERROR> Traceback (most recent call last):
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/_pytest/main.py", line 178, in wrap_session
    INTERNALERROR>     session.exitstatus = doit(config, session) or 0
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/_pytest/main.py", line 214, in _main
    INTERNALERROR>     config.hook.pytest_collection(session=session)
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/pluggy/hooks.py", line 258, in __call__
    INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/pluggy/manager.py", line 67, in _hookexec
    INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/pluggy/manager.py", line 61, in <lambda>
    INTERNALERROR>     firstresult=hook.spec_opts.get('firstresult'),
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/pluggy/callers.py", line 201, in _multicall
    INTERNALERROR>     return outcome.get_result()
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/pluggy/callers.py", line 77, in get_result
    INTERNALERROR>     _reraise(*ex)  # noqa
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/pluggy/callers.py", line 180, in _multicall
    INTERNALERROR>     res = hook_impl.function(*args)
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/_pytest/main.py", line 224, in pytest_collection
    INTERNALERROR>     return session.perform_collect()
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/_pytest/main.py", line 431, in perform_collect
    INTERNALERROR>     session=self, config=self.config, items=items
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/pluggy/hooks.py", line 258, in __call__
    INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/pluggy/manager.py", line 67, in _hookexec
    INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/pluggy/manager.py", line 61, in <lambda>
    INTERNALERROR>     firstresult=hook.spec_opts.get('firstresult'),
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/pluggy/callers.py", line 201, in _multicall
    INTERNALERROR>     return outcome.get_result()
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/pluggy/callers.py", line 77, in get_result
    INTERNALERROR>     _reraise(*ex)  # noqa
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/pluggy/callers.py", line 180, in _multicall
    INTERNALERROR>     res = hook_impl.function(*args)
    INTERNALERROR>   File "/builds/bliss/bliss/tests/controllers_hw/conftest.py", line 16, in pytest_collection_modifyitems
    INTERNALERROR>     if config.getoption('--pepu') is None:
    INTERNALERROR>   File "/miniconda/envs/testenv/lib/python2.7/site-packages/_pytest/config/__init__.py", line 896, in getoption
    INTERNALERROR>     raise ValueError("no option named %r" % (name,))
    INTERNALERROR> ValueError: no option named 'pepu'
    434ef421