def test_clear_empty(self): """ Test clear method when list is empty """ dlist = DiskList() dlist.clear() self.assertTrue(len(dlist) == 0)
def test_clear(self): """ Test the clear method """ dlist = DiskList() dlist.append('0') dlist.append('1') dlist.clear() self.assertTrue(len(dlist) == 0)
def test_clear_not_empty(self): """ Test clear method """ dlist = DiskList() dlist.append('0') dlist.append('1') dlist.append('2') dlist.append('3') dlist.clear() self.assertTrue(len(dlist) == 0)