#NEWLINE# def test01_wktreader( self ) : #NEWLINE# #INDENT# wkt_r = WKTReader ( ) #NEWLINE# wkt = 'POINT (5 23)' #NEWLINE# ref = GEOSGeometry ( wkt ) #NEWLINE# g1 = wkt_r . read ( wkt . encode ( ) ) #NEWLINE# g2 = wkt_r . read ( wkt ) #NEWLINE# for geom in ( g1 , g2 ) : #NEWLINE# #INDENT# self . assertEqual ( ref , geom ) #NEWLINE# #UNINDENT# with self . assertRaises ( TypeError ) : #NEWLINE# #INDENT# wkt_r . read ( 1 ) #NEWLINE# #UNINDENT# with self . assertRaises ( TypeError ) : #NEWLINE# #INDENT# wkt_r . read ( memoryview ( b'foo' ) )