summaryrefslogtreecommitdiff
path: root/src/python/test
diff options
context:
space:
mode:
authorMathieuCarriere <mathieu.carriere3@gmail.com>2021-11-19 14:20:52 +0100
committerMathieuCarriere <mathieu.carriere3@gmail.com>2021-11-19 14:20:52 +0100
commit00ac6d157cacf37cca2f2934226644d037c0ffe6 (patch)
tree2f44347cedb3e269eb33bb4e15be5d7ae8de468f /src/python/test
parent7b83812e37986c9adf9cccaeab360f1d4ffa846f (diff)
parent61416d47f1d4fd96694ae58a83d29505b637d421 (diff)
Merge branch 'master' of https://github.com/GUDHI/gudhi-devel into diff
Diffstat (limited to 'src/python/test')
-rwxr-xr-xsrc/python/test/test_dtm.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/python/test/test_dtm.py b/src/python/test/test_dtm.py
index c29471cf..e46d616c 100755
--- a/src/python/test/test_dtm.py
+++ b/src/python/test/test_dtm.py
@@ -91,13 +91,11 @@ def test_density():
def test_dtm_overflow_warnings():
pts = numpy.array([[10., 100000000000000000000000000000.], [1000., 100000000000000000000000000.]])
- impl_warn = ["keops", "hnsw"]
with warnings.catch_warnings(record=True) as w:
- for impl in impl_warn:
- dtm = DistanceToMeasure(2, q=10000, implementation=impl)
- r = dtm.fit_transform(pts)
- assert len(w) == 2
- for i in range(len(w)):
- assert issubclass(w[i].category, RuntimeWarning)
- assert "Overflow" in str(w[i].message)
+ # TODO Test "keops" implementation as well when next version of pykeops (current is 1.5) is released (should fix the problem (cf. issue #543))
+ dtm = DistanceToMeasure(2, implementation="hnsw")
+ r = dtm.fit_transform(pts)
+ assert len(w) == 1
+ assert issubclass(w[0].category, RuntimeWarning)
+ assert "Overflow" in str(w[0].message)