8000 TST: add test of back-compatibility · matplotlib/matplotlib@f5306b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit f5306b8

Browse files
committed
TST: add test of back-compatibility
1 parent f31d9ad commit f5306b8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5789,3 +5789,21 @@ def test_spines_properbbox_after_zoom():
57895789
None, False, False A724 )
57905790
bb2 = ax.spines['bottom'].get_window_extent(fig.canvas.get_renderer())
57915791
np.testing.assert_allclose(bb.get_points(), bb2.get_points(), rtol=1e-6)
5792+
5793+
5794+
def test_cartopy_backcompat():
5795+
import matplotlib
5796+
import matplotlib.axes
5797+
import matplotlib.axes._subplots
5798+
5799+
class Dummy(matplotlib.axes.Axes):
5800+
...
5801+
5802+
class DummySubplot(matplotlib.axes.SubplotBase, Dummy):
5803+
_axes_class = Dummy
5804+
5805+
matplotlib.axes._subplots._subplot_classes[Dummy] = DummySubplot
5806+
5807+
FactoryDummySubplot = matplotlib.axes.subplot_class_factory(Dummy)
5808+
5809+
assert DummySubplot is FactoryDummySubplot

0 commit comments

Comments
 (0)
0