Created
June 12, 2013 10:57
-
-
Save bubenkoff/5764377 to your computer and use it in GitHub Desktop.
Run pytest with buildout in xdist mode (pytest-xdist)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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