diff options
author | RĂ©mi Flamary <remi.flamary@gmail.com> | 2020-10-22 10:16:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-22 10:16:40 +0200 |
commit | 7adc1b1aa73c55dc07983ff08dcb23fd71e9e8b6 (patch) | |
tree | 701388c52a9accd727bb5b360897e0633b492f6a /test | |
parent | 55164e9272c9899ca413fca411d410ec28b736b0 (diff) |
[MRG] Cleanup minimal build and add separate build for pep8 (#210)
* cleanup requiorement minimal
* add pep8 build
* cleanup sklearn
* skip test if no sklearn
* debug build yaml
* comment error out in test (test sklearn)
* maybe small stuff for better robustness : copy the sub-array
* bump verison minimal build
* update version strict requireent
* update version strict requirement last change
Diffstat (limited to 'test')
-rw-r--r-- | test/test_da.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_da.py b/test/test_da.py index 3b28119..52c6a48 100644 --- a/test/test_da.py +++ b/test/test_da.py @@ -6,11 +6,18 @@ import numpy as np from numpy.testing import assert_allclose, assert_equal +import pytest import ot from ot.datasets import make_data_classif from ot.utils import unif +try: # test if cudamat installed + import sklearn # noqa: F401 + nosklearn = False +except ImportError: + nosklearn = True + def test_sinkhorn_lpl1_transport_class(): """test_sinkhorn_transport @@ -691,6 +698,7 @@ def test_jcpot_barycenter(): np.testing.assert_allclose(prop, [1 - pt, pt], rtol=1e-3, atol=1e-3) +@pytest.mark.skipif(nosklearn, reason="No sklearn available") def test_emd_laplace_class(): """test_emd_laplace_transport """ |