summaryrefslogtreecommitdiff
path: root/test/test_smooth.py
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2018-05-31 12:48:42 +0200
committerRémi Flamary <remi.flamary@gmail.com>2018-05-31 12:48:42 +0200
commit6a048fe809823e41d2b57dbcc22c12bcb7490674 (patch)
tree0c860381447809d75eaea412cf87a72b0fae6b5f /test/test_smooth.py
parentb188381a8e8190958e4e9aca64b7501cf0321406 (diff)
add test worngregularization
Diffstat (limited to 'test/test_smooth.py')
-rw-r--r--test/test_smooth.py8
1 files changed, 7 insertions, 1 deletions
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