'Testing `transform` method (SRID match)'

def test_transform_noop(self):

    if gdal.HAS_GDAL:
        g = GEOSGeometry(u'POINT    (-104.609    38.255)', 4326)
        gt = g.tuple
        g.transform(4326)
        self.assertEqual(g.tuple, gt)
        self.assertEqual(g.srid, 4326)
        g = GEOSGeometry(u'POINT    (-104.609    38.255)', 4326)
        g1 = g.transform(4326, clone=True)
        self.assertEqual(g1.tuple, g.tuple)
        self.assertEqual(g1.srid, 4326)
        self.assertTrue((g1 is not g), u"Clone    didn't    happen")
    old_has_gdal = gdal.HAS_GDAL
    try:
        gdal.HAS_GDAL = False
        g = GEOSGeometry(u'POINT    (-104.609    38.255)', 4326)
        gt = g.tuple
        g.transform(4326)
        self.assertEqual(g.tuple, gt)
        self.assertEqual(g.srid, 4326)
        g = GEOSGeometry(u'POINT    (-104.609    38.255)', 4326)
        g1 = g.transform(4326, clone=True)
        self.assertEqual(g1.tuple, g.tuple)
        self.assertEqual(g1.srid, 4326)
        self.assertTrue((g1 is not g), u"Clone    didn't    happen")
    finally:
        gdal.HAS_GDAL = old_has_gdal
