'Testing `transform` method (no SRID)'

def test23_transform_nosrid(self):

    import warnings
    print '\nBEGIN    -    expecting    Warnings;    safe    to    ignore.\n'
    try:
        warnings.simplefilter('once', UserWarning)
        warnings.simplefilter('once', FutureWarning)
        g = GEOSGeometry('POINT    (-104.609    38.255)', srid=None)
        g.transform(2774)
        self.assertEqual(g.tuple, ((-104.609), 38.255))
        self.assertEqual(g.srid, None)
        g = GEOSGeometry('POINT    (-104.609    38.255)', srid=None)
        g1 = g.transform(2774, clone=True)
        self.assertTrue((g1 is None))
        g = GEOSGeometry('POINT    (-104.609    38.255)', srid=(-1))
        g.transform(2774)
        self.assertEqual(g.tuple, ((-104.609), 38.255))
        self.assertEqual(g.srid, (-1))
        g = GEOSGeometry('POINT    (-104.609    38.255)', srid=(-1))
        g1 = g.transform(2774, clone=True)
        self.assertTrue((g1 is None))
    finally:
        warnings.simplefilter('default', UserWarning)
        warnings.simplefilter('default', FutureWarning)
    print '\nEND    -    expecting    Warnings;    safe    to    ignore.\n'
    try:
        warnings.simplefilter('error', FutureWarning)
        warnings.simplefilter('ignore', UserWarning)
        g = GEOSGeometry('POINT    (-104.609    38.255)', srid=None)
        self.assertRaises(FutureWarning, g.transform, 2774)
        g = GEOSGeometry('POINT    (-104.609    38.255)', srid=None)
        self.assertRaises(FutureWarning, g.transform, 2774, clone=True)
        g = GEOSGeometry('POINT    (-104.609    38.255)', srid=(-1))
        self.assertRaises(FutureWarning, g.transform, 2774)
        g = GEOSGeometry('POINT    (-104.609    38.255)', srid=(-1))
        self.assertRaises(FutureWarning, g.transform, 2774, clone=True)
    finally:
        warnings.simplefilter('default', FutureWarning)
        warnings.simplefilter('default', UserWarning)
