profile
viewpoint

Ask questionsInternal error when running in Azure CI: `pytest_warning_captured` unknown hook

Hi, I'm getting an error whenever I use pytest-azurepipelines with Azure Devops.

My test setup looks like this:

pip install pytest pytest-azurepipelines pytest-cov
pytest tests/ --cov my_project --cov-report html

Then it shows this error:

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/_pytest/main.py", line 178, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/_pytest/main.py", line 214, in _main
INTERNALERROR>     config.hook.pytest_collection(session=session)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/pluggy/hooks.py", line 258, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/pluggy/manager.py", line 67, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/pluggy/manager.py", line 61, in <lambda>
INTERNALERROR>     firstresult=hook.spec_opts.get('firstresult'),
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/pluggy/callers.py", line 201, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/pluggy/callers.py", line 76, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/pluggy/callers.py", line 180, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/_pytest/main.py", line 224, in pytest_collection
INTERNALERROR>     return session.perform_collect()
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/_pytest/main.py", line 427, in perform_collect
INTERNALERROR>     self.config.pluginmanager.check_pending()
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/pluggy/manager.py", line 241, in check_pending
INTERNALERROR>     (name, hookimpl.plugin))
INTERNALERROR> pluggy.manager.PluginValidationError: unknown hook 'pytest_warning_captured' in plugin <module 'pytest_azurepipelines' from '/opt/hostedtoolcache/Python/3.5.9/x64/lib/python3.5/site-packages/pytest_azurepipelines.py'>

Any ideas how to resolve this?

tonybaloney/pytest-azurepipelines

Answer questions tonybaloney

This hook has been deprecated, please try version 1.0.0rc4 of this plugin

useful!

Related questions

No questions were found.
Github User Rank List