tests: fix output capture under nose3.