def test_print_progress(self, mock1): w = WorkerPool(numWorkers=32) c1 = Command('dummy command1', '') c2 = Command('dummy command2', '') w.addCommand(c1) w.addCommand(c2) w.join() w.print_progress(2) self.assertTrue(mock1.called_with('100.00% of jobs completed'))
def test_print_progress(self, mock1): w = WorkerPool(numWorkers=32) c1 = Command('dummy command1', '') c2 = Command('dummy command2', '') w.addCommand(c1) w.addCommand(c2) w.join() w.print_progress(2) self.assertTrue(mock1.called_with('100.00% of jobs completed'))
def test_print_progress_none(self, mock1): w = WorkerPool(numWorkers=32) w.print_progress(0) w.join() self.assertTrue(mock1.called_with('0.00% of jobs completed')) w.haltWork()
def test_print_progress_none(self, mock1): w = WorkerPool(numWorkers=32) w.print_progress(0) w.join() self.assertTrue(mock1.called_with('0.00% of jobs completed')) w.haltWork()