Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running pyjion with pytest-xdist causes Python exception #456

Open
tonybaloney opened this issue Nov 30, 2021 · 1 comment
Open

Running pyjion with pytest-xdist causes Python exception #456

tonybaloney opened this issue Nov 30, 2021 · 1 comment

Comments

@tonybaloney
Copy link
Owner

Related to #454

python -m pytest tests -n auto
======================================================================================== test session starts =========================================================================================
platform darwin -- Python 3.10.0rc2+, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /Users/anthonyshaw/CLionProjects/pyjion/tests, configfile: pytest.ini
plugins: xdist-2.4.0, forked-1.3.0
gw0 [747] / gw1 [747] / gw2 [747] / gw3 [747]
..INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/Users/anthonyshaw/CLionProjects/pyjion/.venv-3.10d/lib/python3.10/site-packages/_pytest/main.py", line 269, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/Users/anthonyshaw/CLionProjects/pyjion/.venv-3.10d/lib/python3.10/site-packages/_pytest/main.py", line 323, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/Users/anthonyshaw/CLionProjects/pyjion/.venv-3.10d/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/Users/anthonyshaw/CLionProjects/pyjion/.venv-3.10d/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/Users/anthonyshaw/CLionProjects/pyjion/.venv-3.10d/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/Users/anthonyshaw/CLionProjects/pyjion/.venv-3.10d/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/Users/anthonyshaw/CLionProjects/pyjion/.venv-3.10d/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/Users/anthonyshaw/CLionProjects/pyjion/.venv-3.10d/lib/python3.10/site-packages/xdist/dsession.py", line 112, in pytest_runtestloop
INTERNALERROR>     self.loop_once()
INTERNALERROR>   File "/Users/anthonyshaw/CLionProjects/pyjion/.venv-3.10d/lib/python3.10/site-packages/xdist/dsession.py", line 135, in loop_once
INTERNALERROR>     call(**kwargs)
INTERNALERROR>   File "/Users/anthonyshaw/CLionProjects/pyjion/.venv-3.10d/lib/python3.10/site-packages/xdist/dsession.py", line 174, in worker_workerfinished
INTERNALERROR>     assert not crashitem, (crashitem, node)
INTERNALERROR> AssertionError: ('test_attr.py::test_missing_attr[2]', <WorkerController gw1>)
INTERNALERROR> assert not 'test_attr.py::test_missing_attr[2]'
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=0 mode='r' encoding='UTF-8'>
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=0 mode='r' encoding='UTF-8'>
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=0 mode='r' encoding='UTF-8'>
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=0 mode='r' encoding='UTF-8'>

========================================================================================= 2 passed in 7.34s ==========================================================================================
@tonybaloney
Copy link
Owner Author

tonybaloney commented Nov 30, 2021

this is actually caused by the existence of the hook. pytest-dev/pytest-xdist#674

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant