def testIndex_Exception(self): r=DLList([1,2,'boy','cat',9]) try: b=r.index('seed') self.assertTrue(False,'No Exception/or Right Type of Error Raised') except ValueError: pass
def testIndex_start(self): r=DLList([1,2,'boy','cat',9]) b=r.index(1) self.assertEqual(b,0)
def testIndex_end(self): r=DLList([1,2,'boy','cat',9]) b=r.index(9) self.assertEqual(b,4)
def testIndex_mid(self): r=DLList([1,2,'boy','cat',9]) b=r.index('boy') self.assertEqual(b,2)