#NEWLINE# def test_pickle( self ) : #NEWLINE# #INDENT# 'Testing pickling and unpickling support.' #NEWLINE# from django.utils.six.moves import cPickle #NEWLINE# import pickle #NEWLINE# def get_geoms( lst , srid = None ) : #NEWLINE# #INDENT# return [ GEOSGeometry ( tg . wkt , srid ) for tg in lst ] #NEWLINE# #UNINDENT# tgeoms = get_geoms ( self . geometries . points ) #NEWLINE# tgeoms . extend ( get_geoms ( self . geometries . multilinestrings , 4326 ) ) #NEWLINE# tgeoms . extend ( get_geoms ( self . geometries . polygons , 3084 ) ) #NEWLINE# tgeoms . extend ( get_geoms ( self . geometries . multipolygons , 900913 ) ) #NEWLINE# no_srid = ( self . null_srid == ( - 1 ) ) #NEWLINE# for geom in tgeoms : #NEWLINE# #INDENT# ( s1 , s2 ) = ( cPickle . dumps ( geom ) , pickle . dumps ( geom ) ) #NEWLINE# ( g1 , g2 ) = ( cPickle . loads ( s1 ) , pickle . loads ( s2 ) ) #NEWLINE# for tmpg in ( g1 , g2 ) : #NEWLINE# #INDENT# self . assertEqual ( geom , tmpg ) #NEWLINE# if ( not no_srid ) : #NEWLINE# #INDENT# self . assertEqual ( geom . srid , tmpg . srid )