def test10_checkindex(self):
        pl, ul = self.lists_of_len()
        for i in self.limits_plus(0):
            if i < 0:
                self.assertEqual(ul._checkindex(i), i + self.limit, '_checkindex(neg index)')
            else:
                self.assertEqual(ul._checkindex(i), i, '_checkindex(pos index)')

        for i in (-self.limit - 1, self.limit):
            self.assertRaises(IndexError, ul._checkindex, i)

        ul._IndexError = TypeError
        self.assertRaises(TypeError, ul._checkindex, -self.limit - 1)
Index check
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/contrib/gis/geos/tests/test_mutable_list.py/ListMixinTest.test10_checkindex