diff options
author | Thomas Beierlein <tomjbe@gentoo.org> | 2023-02-18 17:16:38 +0100 |
---|---|---|
committer | Thomas Beierlein <tomjbe@gentoo.org> | 2023-02-18 17:18:21 +0100 |
commit | d5a9bcdbfaff5a2a5378226a1c68a834febe94f5 (patch) | |
tree | 4979fe1cbd447d244c5f1010574c1f684e15e616 /sci-libs/cartopy | |
parent | kde-frameworks/qqc2-desktop-style: Stabilize 5.102.0 amd64, #891927 (diff) | |
download | gentoo-d5a9bcdbfaff5a2a5378226a1c68a834febe94f5.tar.gz gentoo-d5a9bcdbfaff5a2a5378226a1c68a834febe94f5.tar.bz2 gentoo-d5a9bcdbfaff5a2a5378226a1c68a834febe94f5.zip |
sci-libs/cartopy: Fix test error for >=dev-python/matplotlib-3.7
Signed-off-by: Thomas Beierlein <tomjbe@gentoo.org>
Diffstat (limited to 'sci-libs/cartopy')
-rw-r--r-- | sci-libs/cartopy/cartopy-0.21.1.ebuild | 2 | ||||
-rw-r--r-- | sci-libs/cartopy/files/cartopy-0.21.1-fix-test.patch | 28 |
2 files changed, 30 insertions, 0 deletions
diff --git a/sci-libs/cartopy/cartopy-0.21.1.ebuild b/sci-libs/cartopy/cartopy-0.21.1.ebuild index 380a7c7ba024..e5519d8baee0 100644 --- a/sci-libs/cartopy/cartopy-0.21.1.ebuild +++ b/sci-libs/cartopy/cartopy-0.21.1.ebuild @@ -55,6 +55,8 @@ BDEPEND=" ) " +PATCHES=( "${FILESDIR}"/${P}-fix-test.patch ) + EPYTEST_IGNORE=( # Require network access, not covered by markers lib/cartopy/tests/mpl/test_crs.py diff --git a/sci-libs/cartopy/files/cartopy-0.21.1-fix-test.patch b/sci-libs/cartopy/files/cartopy-0.21.1-fix-test.patch new file mode 100644 index 000000000000..fd308b326c68 --- /dev/null +++ b/sci-libs/cartopy/files/cartopy-0.21.1-fix-test.patch @@ -0,0 +1,28 @@ +Matplotlib-3.7 has merged SubplotBase into AxesBase now, which makes the +class string representation here GeoAxes now, even though we are +still an _instance_ of GeoAxesSubplot + +Backported from https://github.com/SciTools/cartopy/commit/6b4572ba1a8a877f28e25dfe9559c14b7a565958?diff=unified +diff --git a/lib/cartopy/tests/mpl/test_axes.py b/lib/cartopy/tests/mpl/test_axes.py +index eaf5904..d4e37a1 100644 +--- a/lib/cartopy/tests/mpl/test_axes.py ++++ b/lib/cartopy/tests/mpl/test_axes.py +@@ -13,7 +13,8 @@ import pytest + + import cartopy.crs as ccrs + import cartopy.feature as cfeature +-from cartopy.mpl.geoaxes import InterProjectionTransform, GeoAxes ++from cartopy.mpl.geoaxes import ( ++ InterProjectionTransform, GeoAxes, GeoAxesSubplot) + + + class TestNoSpherical: +@@ -119,7 +120,7 @@ class Test_Axes_add_geometries: + + def test_geoaxes_subplot(): + ax = plt.subplot(1, 1, 1, projection=ccrs.PlateCarree()) +- assert str(ax.__class__) == "<class 'cartopy.mpl.geoaxes.GeoAxesSubplot'>" ++ assert isinstance(ax, GeoAxesSubplot) + + + @pytest.mark.mpl_image_compare(filename='geoaxes_subslice.png') |