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.
1 parent 49af122 commit eaa05d1Copy full SHA for eaa05d1
test/test_plot.py
@@ -5,10 +5,18 @@
5
# License: MIT License
6
7
import numpy as np
8
-import matplotlib
9
-matplotlib.use('Agg')
+import pytest
10
11
+try: # test if matplotlib is installed
12
+ import matplotlib
13
+ matplotlib.use('Agg')
14
+ nogo = False
15
+except ImportError:
16
+ nogo = True
17
+
18
19
+@pytest.mark.skipif(nogo, reason="Matplotlib not installed")
20
def test_plot1D_mat():
21
22
import ot
@@ -30,6 +38,7 @@ def test_plot1D_mat():
30
38
ot.plot.plot1D_mat(a, b, M, 'Cost matrix M')
31
39
32
40
41
33
42
def test_plot2D_samples_mat():
34
43
35
44
0 commit comments