I'm using py.test to run tests. I'm using it with pytest-xdist to run the tests in parallel. I want to see the output of print statements in my tests.
I have: Ubuntu 15.10, Python 2.7.10, pytest-2.9.1, pluggy-0.3.1.
Here's my test file:
def test_a():
print 'test_a'
def test_b():
print 'test_b'
When I run py.test, nothing is printed. That's expected: by default, py.test captures output.
When I run py.test -s, it prints test_a and test_b, as it should.
When I run py.test -s -n2, again nothing is printed. How can I get the print statements to work while using -n2?
I've already read pytest + xdist without capturing output and this bug report.