                  self.assertEqual(l.tup, ls.tuple)
  
              self.assertEqual(ls, fromstr(l.wkt))
              self.assertEqual(False, ls == prev)  # Use assertEqual to test __eq__
              self.assertRaises(IndexError, ls.__getitem__, len(ls))
              prev = ls
  
              # Creating a LineString from a tuple, list, and numpy array
              self.assertEqual(ls, LineString(ls.tuple))  # tuple
              self.assertEqual(ls, LineString(*ls.tuple))  # as individual arguments
 
</s> remove         self.assertRaises(TypeError, ls.__setitem__, 0, (1., 2.))
 </s> add         with self.assertRaises(TypeError):
            ls.__setitem__(0, (1., 2.)) </s> remove         self.assertRaises(TypeError, qs.kml, 'name')
 </s> add         with self.assertRaises(TypeError):
            qs.kml('name') </s> remove         self.assertRaises(TypeError, qs.gml, field_name='name')
 </s> add         with self.assertRaises(TypeError):
            qs.gml(field_name='name') </s> remove         self.assertRaises(Exception, cache.set, 'a' * 251, 'value')
 </s> add         with self.assertRaises(Exception):
            cache.set('a' * 251, 'value') </s> remove         self.assertRaises(IntegrityError, a.protect.delete)
 </s> add         with self.assertRaises(IntegrityError):
            a.protect.delete()
            with self.assertRaises(IndexError):
                ls.__getitem__(len(ls))
                  self.assertEqual(l.tup, ls.tuple)
  
              self.assertEqual(ls, fromstr(l.wkt))
              self.assertEqual(False, ls == prev)  # Use assertEqual to test __eq__
            with self.assertRaises(IndexError):
                ls.__getitem__(len(ls))
              prev = ls
  
              # Creating a LineString from a tuple, list, and numpy array
              self.assertEqual(ls, LineString(ls.tuple))  # tuple
              self.assertEqual(ls, LineString(*ls.tuple))  # as individual arguments
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_geos.py