From 6a048fe809823e41d2b57dbcc22c12bcb7490674 Mon Sep 17 00:00:00 2001 From: RĂ©mi Flamary Date: Thu, 31 May 2018 12:48:42 +0200 Subject: add test worngregularization --- test/test_smooth.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/test_smooth.py b/test/test_smooth.py index 37cc66e..7aceb42 100644 --- a/test/test_smooth.py +++ b/test/test_smooth.py @@ -5,8 +5,8 @@ # License: MIT License import numpy as np - import ot +import pytest def test_smooth_ot_dual(): @@ -20,6 +20,9 @@ def test_smooth_ot_dual(): M = ot.dist(x, x) + with pytest.raises(NotImplementedError) as e_info: + Gl2, log = ot.smooth.smooth_ot_dual(u, u, M, 1, reg_type='none') + Gl2, log = ot.smooth.smooth_ot_dual(u, u, M, 1, reg_type='l2', log=True, stopThr=1e-10) # check constratints @@ -52,6 +55,9 @@ def test_smooth_ot_semi_dual(): M = ot.dist(x, x) + with pytest.raises(NotImplementedError) as e_info: + Gl2, log = ot.smooth.smooth_ot_semi_dual(u, u, M, 1, reg_type='none') + Gl2, log = ot.smooth.smooth_ot_semi_dual(u, u, M, 1, reg_type='l2', log=True, stopThr=1e-10) # check constratints -- cgit v1.2.3