class TestFifoList(unittest.TestCase): def setUp(self): self.f = FifoList() self.f.append(1) self.f.append(2) self.f.append(3) def test_pop_returns_first_element(self): self.assertEquals(self.f.pop(), 1) def test_pop_with_index_works(self): self.assertEquals(self.f.pop(1), 2)
class TestFifoList(unittest.TestCase): def setUp(self): self.f = FifoList() self.f.append(1) self.f.append(2) self.f.append(3) def test_pop_returns_first_element(self): self.assertEqual(self.f.pop(), 1) self.assertEqual(len(self.f), 2) def test_sorted_fifo(self): self.assertTrue(sorted_equals_pop(self.f))