Skip to content

Commit 43b1e9a

Browse files
Merge pull request #4 from matplotlib/develop
Update and fix tests for 3.7.0.
2 parents 5f6d07a + 5b7da5f commit 43b1e9a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

matplotview/tests/test_view_obj.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,21 @@
88

99
def test_obj_comparison():
1010
from matplotlib.axes import Subplot, Axes
11+
import matplotlib
12+
13+
mpl_version = tuple(int(v) for v in matplotlib.__version__.split("."))
1114

1215
view_class1 = view_wrapper(Subplot)
1316
view_class2 = view_wrapper(Subplot)
1417
view_class3 = view_wrapper(Axes)
1518

1619
assert view_class1 is view_class2
1720
assert view_class1 == view_class2
18-
assert view_class2 != view_class3
21+
if(mpl_version >= (3, 7, 0)):
22+
# As of 3.7.0, the subplot class no long exists, and is an alias to the Axes class...
23+
assert view_class2 == view_class3
24+
else:
25+
assert view_class2 != view_class3
1926

2027

2128
@check_figures_equal(tol=5.6)

0 commit comments

Comments
 (0)