def testAppend(self): r = DLList() r._append(1) r._append(2) r._append('cat') r._append(4) self.assertEqual(str(r),str([1,2,'cat',4]))
def test_iter(self): r = DLList() r._append(0) r._append(1) r._append(2) r._append(3) r._append(4) r._append(5) i = 0 _iter = r.__iter__() while True: try: a = _iter.__next__() self.assertEqual(i,a) i = i +1 except StopIteration: return except: self.assertTrue(False,'Iterating Is not working properly')