def __init__(self, wkt, **kwargs):
        self.wkt = wkt

        self.bad = kwargs.pop('bad', False)

        if not self.bad:
            m = wkt_regex.match(wkt)
            if not m:
                raise Exception, 'Improper WKT: "%s"' % wkt
            self.geo_type = m.group('type')

        for key, value in kwargs.items():
            setattr(self, key, value)

# For the old tests
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/contrib/gis/tests/geometries.py/TestGeom.__init__/original