Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
def test_partial_run():
    patcher = patch("sys.stdout", new_callable=StringIO)
    fake_stdout = patcher.start()
    reporter.report_partial_run(1, 20)
    patcher.stop()
    eq_(fake_stdout.getvalue(), "Templated 1 out of 20 files.\n")