diff options
author | tvayer <titouan.vayer@gmail.com> | 2019-05-29 14:24:05 +0200 |
---|---|---|
committer | tvayer <titouan.vayer@gmail.com> | 2019-05-29 14:24:05 +0200 |
commit | 63bbeb34e48f02c97a762dab5232158d90a5cffc (patch) | |
tree | 853026b5854b6e4b01fdf750db139985b3dd596f /test/test_plot.py | |
parent | f70aabfcc11f92181e0dc987b341bad8ec030d75 (diff) | |
parent | f66ab58c7c895011fd37bafd3e848828399c56c4 (diff) |
Merge remote-tracking branch 'rflamary/master'
merge pot
Diffstat (limited to 'test/test_plot.py')
-rw-r--r-- | test/test_plot.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/test_plot.py b/test/test_plot.py index f77d879..caf84de 100644 --- a/test/test_plot.py +++ b/test/test_plot.py @@ -5,10 +5,18 @@ # License: MIT License import numpy as np -import matplotlib -matplotlib.use('Agg') +import pytest +try: # test if matplotlib is installed + import matplotlib + matplotlib.use('Agg') + nogo = False +except ImportError: + nogo = True + + +@pytest.mark.skipif(nogo, reason="Matplotlib not installed") def test_plot1D_mat(): import ot @@ -30,6 +38,7 @@ def test_plot1D_mat(): ot.plot.plot1D_mat(a, b, M, 'Cost matrix M') +@pytest.mark.skipif(nogo, reason="Matplotlib not installed") def test_plot2D_samples_mat(): import ot |