'Testing the fromfile() factory.'

def test01k_fromfile(self):

    from StringIO import StringIO
    ref_pnt = GEOSGeometry('POINT(5    23)')
    wkt_f = StringIO()
    wkt_f.write(ref_pnt.wkt)
    wkb_f = StringIO()
    wkb_f.write(str(ref_pnt.wkb))
    for fh in (wkt_f, wkb_f):
        fh.seek(0)
        pnt = fromfile(fh)
        self.assertEqual(ref_pnt, pnt)
