Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: Update Lambert Conformal test tolerances #2209

Merged
merged 1 commit into from
Jul 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions lib/cartopy/tests/crs/test_lambert_conformal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# licensing details.

from numpy.testing import assert_array_almost_equal
import pyproj
import pytest

import cartopy.crs as ccrs
Expand Down Expand Up @@ -68,18 +69,29 @@ def test_too_many_parallel(self):

def test_single_spole(self):
s_pole_crs = ccrs.LambertConformal(standard_parallels=[-1.])
expected_x = (-19939660, 19939660)
expected_y = (-735590302, -8183795)
if pyproj.__proj_version__ >= '9.2.0':
expected_x = (-19840440, 19840440)
expected_y = (-370239953, -8191953)
print(s_pole_crs.x_limits)
assert_array_almost_equal(s_pole_crs.x_limits,
(-19939660, 19939660),
expected_x,
decimal=0)
assert_array_almost_equal(s_pole_crs.y_limits,
(-735590302, -8183795),
expected_y,
decimal=0)

def test_single_npole(self):
n_pole_crs = ccrs.LambertConformal(standard_parallels=[1.])
expected_x = (-20130569, 20130569)
expected_y = (-8170229, 726200683)
if pyproj.__proj_version__ >= '9.2.0':
expected_x = (-20222156, 20222156)
expected_y = (-8164817, 360848719)
assert_array_almost_equal(n_pole_crs.x_limits,
(-20130569, 20130569),
expected_x,
decimal=0)
assert_array_almost_equal(n_pole_crs.y_limits,
(-8170229, 726200683),
expected_y,
decimal=0)