stdout flushing in test.py makes a nice progress bar