示例#1
0
 def test09_authority(self):
     "Testing the authority name & code routines."
     for s in srlist:
         if hasattr(s, 'auth'):
             srs = SpatialReference(s.wkt)
             for target, tup in s.auth.items():
                 self.assertEqual(tup[0], srs.auth_name(target))
                 self.assertEqual(tup[1], srs.auth_code(target))
示例#2
0
 def test02_bad_wkt(self):
     "Testing initialization on invalid WKT."
     for bad in bad_srlist:
         try:
             srs = SpatialReference(bad)
             srs.validate()
         except (SRSException, OGRException):
             pass
         else:
             self.fail('Should not have initialized on bad WKT "%s"!')