Skip to content

Commit

Permalink
Merge pull request #2130 from greglucas/mpl37-subplot-class
Browse files Browse the repository at this point in the history
TST/FIX: Test for instance rather than string in class representation
  • Loading branch information
dopplershift authored Jan 26, 2023
2 parents a8f62ba + 6b4572b commit 36eac40
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/cartopy/tests/mpl/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

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:
Expand Down Expand Up @@ -119,7 +120,7 @@ def test_single_geometry(self):

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')
Expand Down

0 comments on commit 36eac40

Please sign in to comment.