Skip to content

pytest-xdist not compatible with pytest 3.4.0 #275

@samuelcolvin

Description

@samuelcolvin

Running tests with pytest-3.4 both xdist-1.22.0 (most recent released version) and xdist-1.22.1.dev1+g3098f27 (current master). I'm getting the error below.

I thought this might be fixed by #266 but apparently not since I still get the error with master.

This was working fine with pytest-3.3.2.

I've looked and couldn't find a duplicate of this, sorry if I'm being blind. I'm aware this could be an error with another plugin, but xdist looked most likely so I started here.

(env) TutorCruncher2 0 123ms ➤  pytest TutorCruncher/accounting/tests/test_ahcs.py
Test session starts (platform: linux, Python 3.6.3, pytest 3.4.0, pytest-sugar 0.9.0)
Django settings: TutorCruncher.test_settings (from ini file)
rootdir: /home/samuel/TutorCruncher2, inifile: setup.cfg
plugins: xdist-1.22.1.dev1+g3098f27, timeout-1.2.1, sugar-0.9.0, forked-0.2, django-3.1.2, cov-2.5.1
timeout: 60.0s method: signal

 TutorCruncher/accounting/tests/test_ahcs.py ✓                                                                                                 4% ▌         
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/_pytest/main.py", line 100, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/_pytest/main.py", line 138, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/__init__.py", line 617, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/__init__.py", line 222, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/__init__.py", line 216, in <lambda>
INTERNALERROR>     firstresult=hook.spec_opts.get('firstresult'),
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/callers.py", line 201, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/_pytest/main.py", line 161, in pytest_runtestloop
INTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/__init__.py", line 617, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/__init__.py", line 222, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/__init__.py", line 216, in <lambda>
INTERNALERROR>     firstresult=hook.spec_opts.get('firstresult'),
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/callers.py", line 201, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/_pytest/runner.py", line 64, in pytest_runtest_protocol
INTERNALERROR>     nodeid=item.nodeid, location=item.location,
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/__init__.py", line 617, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/__init__.py", line 222, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/__init__.py", line 216, in <lambda>
INTERNALERROR>     firstresult=hook.spec_opts.get('firstresult'),
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/callers.py", line 201, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/samuel/TutorCruncher2/env/lib/python3.6/site-packages/_pytest/terminal.py", line 315, in pytest_runtest_logfinish
INTERNALERROR>     last_item = len(self._progress_nodeids_reported) == self._session.testscollected
INTERNALERROR> AttributeError: 'NoneType' object has no attribute 'testscollected'


Results (4.08s):
       1 passed
(env) TutorCruncher2 3 5.55s ➤  

I hope that includes all information need, if not, let me know and I'll provide what I can.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions