Skip to content

Commit 831a5fe

Browse files
committed
Tests spawning node via subprocess now skip on WASM because emscripten can't do that
1 parent 434118f commit 831a5fe

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/ndarray/test_dsl_js.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def uses_index(a):
132132
dsl_to_js(uses_index)
133133

134134

135+
@pytest.mark.skipif(blosc2.IS_WASM, reason="emscripten cannot spawn the node subprocess")
135136
def test_newton_matches_python():
136137
w, h, max_iter, relax = 40, 30, 48, 1.37
137138
pts = [[-1.7 + 3.4 * c / (w - 1), -1.1 + 2.2 * r / (h - 1)] for r in range(h) for c in range(w)]
@@ -141,6 +142,7 @@ def test_newton_matches_python():
141142
assert maxdiff < 1e-9, f"newton py-vs-js mismatch: maxdiff={maxdiff}"
142143

143144

145+
@pytest.mark.skipif(blosc2.IS_WASM, reason="emscripten cannot spawn the node subprocess")
144146
def test_misc_matches_python():
145147
pts = [[3.5, 16.0], [1.2, 9.0], [-4.3, 25.0], [8.0, 4.0], [0.0, 100.0]]
146148
ref = []
@@ -208,6 +210,7 @@ def test_prefer_js_falls_back_on_untranspilable(monkeypatch):
208210
assert expr is _idx
209211

210212

213+
@pytest.mark.skipif(blosc2.IS_WASM, reason="this test asserts off-WASM behavior")
211214
def test_explicit_js_off_wasm_raises():
212215
# jit_backend="js" is an explicit choice -> hard error off-WASM (not a silent fallback).
213216
assert not blosc2.IS_WASM # this test runs on a native build

0 commit comments

Comments
 (0)