fix bug: nose on python 3 with captured stdout throws exception in unit test result