From 7adc1b1aa73c55dc07983ff08dcb23fd71e9e8b6 Mon Sep 17 00:00:00 2001 From: RĂ©mi Flamary Date: Thu, 22 Oct 2020 10:16:40 +0200 Subject: [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 --- test/test_da.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') 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 """ -- cgit v1.2.3