#NEWLINE# def test04_to_python( self ) : #NEWLINE# #INDENT# '\n        Testing to_python returns a correct GEOSGeometry object or\n        a ValidationError\n        ' #NEWLINE# fld = forms . GeometryField ( ) #NEWLINE# for wkt in ( 'POINT(5 23)' , 'MULTIPOLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)))' , 'LINESTRING(0 0, 1 1)' ) : #NEWLINE# #INDENT# self . assertEqual ( GEOSGeometry ( wkt ) , fld . to_python ( wkt ) ) #NEWLINE# #UNINDENT# for wkt in ( 'POINT(5)' , 'MULTI   POLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)))' , 'BLAH(0 0, 1 1)' ) : #NEWLINE# #INDENT# self . assertRaises ( forms . ValidationError , fld . to_python , wkt )