class TestWorkChunk(unittest.TestCase): def setUp(self): self.chunk = WorkChunk(0, 2) def test_elapsed(self): self.assertEqual(self.chunk.elapsed, 2) def test_elapsed_from_start_shortened(self): self.assertEqual(self.chunk.elapsed_from_start(1), 1) def test_elapsed_from_start_default(self): self.assertEqual(self.chunk.elapsed_from_start(0), 2)
def setUp(self): self.chunk = WorkChunk(0, 2)