We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5f6d07a + 5b7da5f commit 43b1e9aCopy full SHA for 43b1e9a
matplotview/tests/test_view_obj.py
@@ -8,14 +8,21 @@
8
9
def test_obj_comparison():
10
from matplotlib.axes import Subplot, Axes
11
+ import matplotlib
12
+
13
+ mpl_version = tuple(int(v) for v in matplotlib.__version__.split("."))
14
15
view_class1 = view_wrapper(Subplot)
16
view_class2 = view_wrapper(Subplot)
17
view_class3 = view_wrapper(Axes)
18
19
assert view_class1 is view_class2
20
assert view_class1 == view_class2
- 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
26
27
28
@check_figures_equal(tol=5.6)
0 commit comments