def report(self): if self.templated_count == 0: reporter.report_no_action() elif self.templated_count == self.file_count: reporter.report_full_run(self.file_count) else: reporter.report_partial_run(self.templated_count, self.file_count)
def test_full_run(): patcher = patch("sys.stdout", new_callable=StringIO) fake_stdout = patcher.start() reporter.report_full_run(20) patcher.stop() eq_(fake_stdout.getvalue(), "Templated 20 files.\n")