'Testing the fromfile() factory.'

def test_fromfile(self):

    ref_pnt = GEOSGeometry(u'POINT(5    23)')
    wkt_f = BytesIO()
    wkt_f.write(force_bytes(ref_pnt.wkt))
    wkb_f = BytesIO()
    wkb_f.write(bytes(ref_pnt.wkb))
    for fh in (wkt_f, wkb_f):
        fh.seek(0)
        pnt = fromfile(fh)
        self.assertEqual(ref_pnt, pnt)
