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

Fix image tests #2058

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ install:
- conda config --add channels conda-forge
- conda config --add channels conda-forge/label/testing
- set ENV_NAME=test-environment
- set PACKAGES=%PACKAGES% owslib pep8 pillow pyshp pytest pytest-mpl
- set PACKAGES=%PACKAGES% owslib pep8 pillow pyshp pytest pytest-mpl!=0.16.0
- set PACKAGES=%PACKAGES% setuptools_scm shapely
- conda create -n %ENV_NAME% python=%PYTHON_VERSION% %PACKAGES%
- activate %ENV_NAME%
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- name: Install dependencies
run: |
PACKAGES="$PACKAGES owslib pep8 pillow pyshp pytest pytest-mpl"
PACKAGES="$PACKAGES owslib pep8 pillow pyshp pytest pytest-mpl!=0.16.0"
PACKAGES="$PACKAGES pytest-xdist setuptools_scm shapely"
conda install $PACKAGES
conda info -a
Expand Down
Binary file modified lib/cartopy/tests/mpl/baseline_images/mpl/test_crs/igh_land.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified lib/cartopy/tests/mpl/baseline_images/mpl/test_crs/igh_ocean.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions lib/cartopy/tests/mpl/test_crs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
import pytest

import cartopy.crs as ccrs
from cartopy.tests.mpl import MPL_VERSION


@pytest.mark.natural_earth
@pytest.mark.mpl_image_compare(filename="igh_land.png")
@pytest.mark.mpl_image_compare(filename="igh_land.png",
tolerance=(3.6
if MPL_VERSION.release[:2] < (3, 5)
else 0.5))
def test_igh_land():
crs = ccrs.InterruptedGoodeHomolosine(emphasis="land")
ax = plt.axes(projection=crs)
Expand All @@ -21,7 +25,10 @@ def test_igh_land():


@pytest.mark.natural_earth
@pytest.mark.mpl_image_compare(filename="igh_ocean.png")
@pytest.mark.mpl_image_compare(filename="igh_ocean.png",
tolerance=(4.5
if MPL_VERSION.release[:2] < (3, 5)
else 0.5))
def test_igh_ocean():
crs = ccrs.InterruptedGoodeHomolosine(
central_longitude=-160, emphasis="ocean"
Expand Down