Skip to content

Commit

Permalink
TEST: Re-enable test for Mercator scale factor
Browse files Browse the repository at this point in the history
Had been disabled since merge waiting on a viable Cartopy version, which
has long-since been released.
  • Loading branch information
dopplershift committed Jun 25, 2021
1 parent 4b8f995 commit 28d95a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ where = src
[options.extras_require]
doc = sphinx; sphinx-gallery>=0.4; myst-parser; netCDF4
examples = cartopy>=0.15.0; matplotlib>=2.2.0
test = pytest>=2.4; pytest-mpl; cartopy>=0.16.0; netCDF4
test = pytest>=2.4; pytest-mpl; cartopy>=0.17.0; netCDF4

[build_sphinx]
source-dir = docs/source
Expand Down
15 changes: 7 additions & 8 deletions tests/plots/test_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,13 @@ def test_mercator():
assert crs.proj4_params['lon_0'] == -100


# This won't work until at least CartoPy > 0.16.0
# def test_mercator_scale_factor():
# """Test handling a mercator projection with a scale factor."""
# attrs = {'grid_mapping_name': 'mercator', 'scale_factor_at_projection_origin': 0.9}
# crs = CFProjection(attrs).to_cartopy()
#
# assert isinstance(crs, ccrs.Mercator)
# assert crs.proj4_params['k_0'] == 0.9
def test_mercator_scale_factor():
"""Test handling a mercator projection with a scale factor."""
attrs = {'grid_mapping_name': 'mercator', 'scale_factor_at_projection_origin': 0.9}
crs = CFProjection(attrs).to_cartopy()

assert isinstance(crs, ccrs.Mercator)
assert crs.proj4_params['k_0'] == 0.9


def test_geostationary():
Expand Down

0 comments on commit 28d95a2

Please sign in to comment.