Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Run pytest with buildout in xdist mode (pytest-xdist)
buildout.cfg:
[py]
recipe = zc.recipe.egg
...
interpreter = py
initialization =
try:
sys.argv.remove('-u')
except ValueError:
pass
import sys, os
unbuffered = os.fdopen(sys.stdout.fileno(), 'w', 0)
sys.stdout = unbuffered
Run tests:
bin/py.test --tx='2*popen//python=bin/py' --dist=load
@href

This comment has been minimized.

Copy link

href commented Jul 8, 2015

For anyone trying this on Python 3, I had more luck with this:
https://gist.github.com/href/b72b317db2d679711883

from http://stackoverflow.com/a/107717/138103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.