Skip to content

Commit 2ac1fd2

Browse files
committed
Skip tests that expect LinAlgError on WASM
1 parent 4a88e10 commit 2ac1fd2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/tests/test_mlab.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import sys
2+
13
from numpy.testing import (assert_allclose, assert_almost_equal,
24
assert_array_equal, assert_array_almost_equal_nulp)
35
import numpy as np
@@ -873,6 +875,8 @@ def test_single_dataset_element(self):
873875
with pytest.raises(ValueError):
874876
mlab.GaussianKDE([42])
875877

878+
@pytest.mark.skipif(sys.platform == 'emscripten',
879+
reason="WASM doesn't support floating-point exceptions")
876880
def test_silverman_multidim_dataset(self):
877881
"""Test silverman's for a multi-dimensional array."""
878882
x1 = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
@@ -886,6 +890,8 @@ def test_silverman_singledim_dataset(self):
886890
y_expected = 0.76770389927475502
887891
assert_almost_equal(mygauss.covariance_factor(), y_expected, 7)
888892

893+
@pytest.mark.skipif(sys.platform == 'emscripten',
894+
reason="WASM doesn't support floating-point exceptions")
889895
def test_scott_multidim_dataset(self):
890896
"""Test scott's output for a multi-dimensional array."""
891897
x1 = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])

0 commit comments

Comments
 (0)