def test_complete_run_verbosity2_redisplay(self): rep = reporter.ConsoleReporter(StringIO(), {'failure_verbosity': 2}) catched = CatchedException("catched exception there", Exception("foo")) task = Task("t_name", None, verbosity=2) task.executed = True rep.add_failure(task, catched) # assign new StringIO so output is only from complete_run() rep.outstream = StringIO() rep.complete_run() got = rep.outstream.getvalue() assert "<stdout>" in got assert "<stderr>" in got