Is there a way to check whether my python program printed something to a particular stream?
Is there a way to check whether my python program printed something to a particular stream?
For python 3.x you can try
print('print this stuff')
import sys
sys.stdout.write('print this stuff')