Skip to content

Instantly share code, notes, and snippets.

@bubenkoff
Created June 12, 2013 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bubenkoff/5764377 to your computer and use it in GitHub Desktop.
Save bubenkoff/5764377 to your computer and use it in GitHub Desktop.
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
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