def test_fwd_inv(self): for pj in pj_list.keys(): with self.subTest(pj=pj): try: p = Proj(proj=pj) x, y = p(-30, 40) # note, for proj 4.9.2 or before the inverse projection may be missing # and pyproj 1.9.5.1 or before does not test for this and will # give a segmentation fault at this point: lon, lat = p(x, y, inverse=True) except RuntimeError: pass
class ForwardInverseTest(unittest.TestCase): @nose2.tools.params(*pj_list.keys()) def test_fwd_inv(self, pj): try: p = Proj(proj=pj) x,y = p(-30,40) # note, for proj 4.9.2 or before the inverse projection may be missing # and pyproj 1.9.5.1 or before does not test for this and will # give a segmentation fault at this point: lon,lat = p(x,y,inverse=True) except RuntimeError: pass