def test_executeTask(self): rep = reporter.ZeroReporter(io.StringIO(), {}) def do_nothing(): pass t1 = Task("with_action", [(do_nothing, )]) rep.execute_task(t1) assert "" == rep.outstream.getvalue()
def test_runtime_error(self, capsys): msg = "zero runtime error" rep = reporter.ZeroReporter(StringIO(), {}) # imediate output rep.runtime_error(msg) assert msg in capsys.readouterr()[1]