pytest-dev / pytest-dev/pytest-xdist
Error when upgrading to 2.2.1
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 287
- Avg merge
- 9h 30m
- Merged PRs (30d)
- 2
Description
First of all, great work with this plugin.. love it! :)
I got an error in a dockerized CI (Linux) and on my Windows-WSL machine when upgrading to 2.2.1 (from 2.2.0)
INTERNALERROR> def worker_internal_error(self, node, formatted_error):
INTERNALERROR> """
INTERNALERROR> pytest_internalerror() was called on the worker.
INTERNALERROR>
INTERNALERROR> pytest_internalerror() arguments are an excinfo and an excrepr, which can't
INTERNALERROR> be serialized, so we go with a poor man's solution of raising an exception
INTERNALERROR> here ourselves using the formatted message.
INTERNALERROR> """
INTERNALERROR> self._active_nodes.remove(node)
INTERNALERROR> try:
INTERNALERROR> > assert False, formatted_error
INTERNALERROR> E AssertionError: Traceback (most recent call last):
INTERNALERROR> E File "/home/emil/.local/lib/python3.8/site-packages/_pytest/main.py", line 191, in wrap_session
INTERNALERROR> E session.exitstatus = doit(config, session) or 0
INTERNALERROR> E File "/home/emil/.local/lib/python3.8/site-packages/_pytest/main.py", line 246, in _main
INTERNALERROR> E config.hook.pytest_collection(session=session)
INTERNALERROR> E File "/home/emil/.local/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR> E return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> E File "/home/emil/.local/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR> E return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> E File "/home/emil/.local/lib/python3.8/site-packages/pluggy/manager.py", line 84, in <lambda>
INTERNALERROR> E self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
INTERNALERROR> E File "/home/emil/.local/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> E return outcome.get_result()
INTERNALERROR> E File "/home/emil/.local/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> E raise ex[1].with_traceback(ex[2])
INTERNALERROR> E File "/home/emil/.local/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> E res = hook_impl.function(*args)
INTERNALERROR> E File "/home/emil/.local/lib/python3.8/site-packages/_pytest/main.py", line 257, in pytest_collection
INTERNALERROR> E return session.perform_collect()
INTERNALERROR> E File "/home/emil/.local/lib/python3.8/site-packages/_pytest/main.py", line 453, in perform_collect
INTERNALERROR> E self.config.pluginmanager.check_pending()
INTERNALERROR> E File "/home/emil/.local/lib/python3.8/site-packages/pluggy/manager.py", line 274, in check_pending
INTERNALERROR> E raise PluginValidationError(
INTERNALERROR> E pluggy.manager.PluginValidationError: unknown hook 'pytest_warning_recorded' in plugin <__channelexec__.WorkerInteractor object at 0x7f79f94f5b80>
INTERNALERROR> E assert False
I fixed it by downgrading to 2.2.0 again. Running pytest 6.2.2.
Just comment if you need any more information! :)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported upgrade from pytest-xdist 2.2.0 to 2.2.1 with pytest 6.2.2 in the Docker or Windows-WSL environments described. Investigate the collection-time PluginValidationError for the unknown pytest_warning_recorded hook; done means pytest collection and distributed tests run without this internal error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100