diff --git a/.github/workflows/cache_data.yaml b/.github/workflows/cache_data.yaml index 907e26560c9..bc36c6ac867 100644 --- a/.github/workflows/cache_data.yaml +++ b/.github/workflows/cache_data.yaml @@ -39,7 +39,7 @@ jobs: - name: Install dependencies run: | mamba install gmt=6.3.0 numpy pandas xarray netCDF4 packaging \ - build matplotlib + build # Install the package that we want to test - name: Install the package diff --git a/pygmt/helpers/testing.py b/pygmt/helpers/testing.py index a398f3c30d5..7d85e80fcf0 100644 --- a/pygmt/helpers/testing.py +++ b/pygmt/helpers/testing.py @@ -5,7 +5,6 @@ import os import string -from matplotlib.testing.compare import compare_images from pygmt.exceptions import GMTImageComparisonFailure from pygmt.io import load_dataarray from pygmt.src import which @@ -77,7 +76,9 @@ def check_figures_equal(*, extensions=("png",), tol=0.0, result_dir="result_imag KEYWORD_ONLY = inspect.Parameter.KEYWORD_ONLY def decorator(func): - import pytest # pylint: disable=import-outside-toplevel + # pylint: disable=import-outside-toplevel + import pytest + from matplotlib.testing.compare import compare_images os.makedirs(result_dir, exist_ok=True) old_sig = inspect.signature(func)