Skip to content

Commit a073c39

Browse files
committed
[test] skip Test_plot if matplotlib is older than 3.6
1 parent e5727ce commit a073c39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/run_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
99

1010
from iso2mesh import *
11+
import matplotlib
12+
13+
mpl_ver = matplotlib.__version__.split(".")
1114

1215

1316
class Test_geometry(unittest.TestCase):
@@ -1093,6 +1096,9 @@ def test_s2m_plc(self):
10931096

10941097

10951098
class Test_plot(unittest.TestCase):
1099+
@unittest.skipIf(
1100+
(int(mpl_ver[0]), int(mpl_ver[1])) < (3, 6), "Requires Matplotlib 3.6 or higher"
1101+
)
10961102
def __init__(self, *args, **kwargs):
10971103
super(Test_plot, self).__init__(*args, **kwargs)
10981104
self.no, self.el = meshgrid6(

0 commit comments

Comments
 (0)