diff options
author | Hind-M <hind.montassif@gmail.com> | 2021-11-15 14:53:39 +0100 |
---|---|---|
committer | Hind-M <hind.montassif@gmail.com> | 2021-11-15 14:53:39 +0100 |
commit | d88e125fe3b4e1dd0c95c95c5bc715b1a2f28ce6 (patch) | |
tree | 51bb31d15f44a31c357bbefda4f25f8380190298 /src | |
parent | cfb60a50a7c3aea08abc41118fbfdf31061a44a4 (diff) |
Disable test of dtm warnings until next version of pykeops is released (cf. issue #543)
Diffstat (limited to 'src')
-rwxr-xr-x | src/python/test/test_dtm.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/python/test/test_dtm.py b/src/python/test/test_dtm.py index c29471cf..bdf003a3 100755 --- a/src/python/test/test_dtm.py +++ b/src/python/test/test_dtm.py @@ -13,7 +13,7 @@ import numpy import pytest import torch import math -import warnings +#import warnings # used in test_dtm_overflow_warnings def test_dtm_compare_euclidean(): @@ -89,15 +89,16 @@ def test_density(): density = DTMDensity(weights=[0.5, 0.5], metric="neighbors", dim=1).fit_transform(distances) assert density == pytest.approx(expected) -def test_dtm_overflow_warnings(): - pts = numpy.array([[10., 100000000000000000000000000000.], [1000., 100000000000000000000000000.]]) - impl_warn = ["keops", "hnsw"] +# TODO Uncomment this test when next version of pykeops (current is 1.5) is released (should fix the problem (cf. issue #543)) +#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) + #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) |