              else:
                  self.assertEqual(ul._checkindex(i), i, '_checkindex(pos index)')
  
          for i in (-self.limit - 1, self.limit):
              self.assertRaises(IndexError, ul._checkindex, i)
  
      def test_11_sorting(self):
          'Sorting'
          pl, ul = self.lists_of_len()
          pl.insert(0, pl.pop())
 
</s> remove             self.assertRaises(IndexError, setfcn, ul, i)  # 'set index %d' % i)
            self.assertRaises(IndexError, getfcn, ul, i)  # 'get index %d' % i)
            self.assertRaises(IndexError, delfcn, ul, i)  # 'del index %d' % i)
 </s> add             with self.assertRaises(IndexError):  # 'set index %d' % i)
                setfcn(ul, i)
            with self.assertRaises(IndexError):  # 'get index %d' % i)
                getfcn(ul, i)
            with self.assertRaises(IndexError):  # 'del index %d' % i)
                delfcn(ul, i) </s> remove         self.assertRaises(IndexError, popfcn, ul, self.limit)
        self.assertRaises(IndexError, popfcn, ul, -1 - self.limit)
 </s> add         with self.assertRaises(IndexError):
            popfcn(ul, self.limit)
        with self.assertRaises(IndexError):
            popfcn(ul, -1 - self.limit) </s> remove         self.assertRaises(TypeError, setfcn, ul, slice(0, 3, 2), 2)
 </s> add         with self.assertRaises(TypeError):
            setfcn(ul, slice(0, 3, 2), 2) </s> remove             self.assertRaises(ValueError, delfcn, ul, i)
            self.assertRaises(ValueError, setfcn, ul, i)
 </s> add             with self.assertRaises(ValueError):
                delfcn(ul, i)
            with self.assertRaises(ValueError):
                setfcn(ul, i) </s> remove         self.assertRaises(ValueError, ul.append, 10)
 </s> add         with self.assertRaises(ValueError):
            ul.append(10)
            with self.assertRaises(IndexError):
                ul._checkindex(i)
              else:
                  self.assertEqual(ul._checkindex(i), i, '_checkindex(pos index)')
  
          for i in (-self.limit - 1, self.limit):
            with self.assertRaises(IndexError):
                ul._checkindex(i)
  
      def test_11_sorting(self):
          'Sorting'
          pl, ul = self.lists_of_len()
          pl.insert(0, pl.pop())
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/gis_tests/geos_tests/test_mutable_list.py