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

xdist seems to be incompatible with the 'sure' matcher library #90

Closed
gjlondon opened this issue Oct 4, 2016 · 4 comments
Closed

xdist seems to be incompatible with the 'sure' matcher library #90

gjlondon opened this issue Oct 4, 2016 · 4 comments

Comments

@gjlondon
Copy link

gjlondon commented Oct 4, 2016

I'm using pytest (v 3.0.3) for a project and my tests are running slow so I wanted to try speeding them up with xdist (v.1.15). I'm using Python 3.5.2.

When I run

python -m pytest -n 1 test --max-slave-restart=0

The slave crashes with this error:

 File "/Users/gjlondon/anaconda/envs/falcon_spike/lib/python3.5/site-packages/xdist/slavemanage.py", line 308, in process_from_remote
    rep = unserialize_report(eventname, kwargs['data'])
  File "/Users/gjlondon/anaconda/envs/falcon_spike/lib/python3.5/site-packages/xdist/slavemanage.py", line 327, in unserialize_report
    return runner.TestReport(**reportdict)
TypeError: __init__() missing 1 required positional argument: 'when'

I started creating a minimal failing example project and everything worked, until I installed and included the matcher library I'm using, which is called sure.

I'm not sure why the failure is happening (I know sure does a lot monkey patching magic, but it's a pretty useful library for creating human-readable tests). But the crash seems to happen in xdist code so I figured I'd post the issue here. I'd really like to use xdist but I've probably got too much sure code in my tests to remove 😢

Here's a link to a minimal failing example: https://github.com/rogueleaderr/xdist_sure

@gjlondon
Copy link
Author

gjlondon commented Oct 4, 2016

(I cross-posted the issue in the sure repo: gabrielfalcao/sure#127)

@RonnyPfannschmidt
Copy link
Member

seems like sure breaks something pretty deep inside pytest-xdist
at first glance it seems to beentirely the fault of sure - after all it looks like it is patching builtin classes

@timofurrer
Copy link

I've fixed this bug with gabrielfalcao/sure#129 and I'll release asap a new version of sure. Thanks! 🍻

@nicoddemus
Copy link
Member

Many thanks @timofurrer for letting us know!

I'm closing this issue then.

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

4 participants