def test_index_with_bounds(self): """ Test the index method with bounds """ dlist = DiskList() dlist.append('0') dlist.append('1') dlist.append('2') dlist.append('3') self.assertRaises(ValueError, lambda: dlist.index('2', 0, 1))
def test_index(self): """ Test the index method """ dlist = DiskList() dlist.append('0') dlist.append('1') dlist.append('2') dlist.append('3') self.assertTrue(dlist.index('2') == 2)