Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
pytest-xdist with Buildout on Python 3
buildout.cfg:
[py]
recipe = zc.recipe.egg
...
interpreter = py
initialization =
import sys, os
try:
if '-u' in sys.argv:
class Unbuffered(object):
def __init__(self, stream):
self.stream = stream
def write(self, data):
self.stream.write(data)
self.stream.flush()
def __getattr__(self, attr):
return getattr(self.stream, attr)
sys.stdout = Unbuffered(sys.stdout)
sys.argv.remove('-u')
except ValueError:
pass
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
You can’t perform that action at this time.