Skip to content

xdist is incompatible with built-in pytest maxfail argument #62

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

Closed
taliastocks opened this issue Jun 1, 2016 · 3 comments
Closed

xdist is incompatible with built-in pytest maxfail argument #62

taliastocks opened this issue Jun 1, 2016 · 3 comments
Labels

Comments

@taliastocks
Copy link

Steps to reproduce:

  • Create test_deleteme.py in an otherwise empty directory (e.g. /tmp/deleteme):
import time

def test_0 ():
    assert False

def test_1 ():
    time.sleep(1)

def test_2 ():
    pass

def test_3 ():
    pass

def test_4 ():
    pass
  • Change to the test directory (cd /tmp/deleteme).
  • Run py.test -x -n2 or py.test --maxfail=1 -n2.

The output should show that one test has failed, and it does. However, it should not show INTERNALERROR>. See the full output:

/tmp/deleteme$ py.test -x -n2
================================================ test session starts ================================================
platform linux2 -- Python 2.7.9, pytest-2.9.1, py-1.4.31, pluggy-0.3.1
rootdir: /tmp/deleteme, inifile: 
plugins: xdist-1.14
gw0 [5] / gw1 [5]
scheduling tests via LoadScheduling
FINTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/_pytest/main.py", line 94, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/_pytest/main.py", line 125, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 724, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 338, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 333, in <lambda>
INTERNALERROR>     _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 596, in execute
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "<remote exec>", line 49, in pytest_runtestloop
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/execnet/gateway_base.py", line 737, in receive
INTERNALERROR>     raise self._getremoteerror() or EOFError()
INTERNALERROR> EOFError
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/_pytest/main.py", line 94, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/_pytest/main.py", line 125, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 724, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 338, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 333, in <lambda>
INTERNALERROR>     _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 596, in execute
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "<remote exec>", line 49, in pytest_runtestloop
INTERNALERROR>   File "/usr/local/lib/python2.7/dist-packages/execnet/gateway_base.py", line 737, in receive
INTERNALERROR>     raise self._getremoteerror() or EOFError()
INTERNALERROR> EOFError

===================================================== FAILURES ======================================================
______________________________________________________ test_0 _______________________________________________________
[gw0] linux2 -- Python 2.7.9 /usr/bin/python
def test_0 ():
>       assert False
E       assert False

test_deleteme.py:5: AssertionError
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================= 1 failed in 1.55 seconds ==============================================
@nicoddemus
Copy link
Member

Yes, that's certainly annoying. Thanks for the report!

@nicoddemus nicoddemus added the bug label Jun 1, 2016
@taliastocks
Copy link
Author

You're able to reproduce the issue by following my steps? I'm sorry that I wasn't able to come up with a simpler example, but this one reproduced the error pretty consistently for me. Let me know if you need any more information.

@nicoddemus
Copy link
Member

I didn't try, but I've seen it happen if memory serves correctly. 😁

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

No branches or pull requests

2 participants