Skip to content

Commit 199928d

Browse files
Add a constant to check if platform is WASM
1 parent 6ce4127 commit 199928d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

numcodecs/tests/common.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import json as _json
33
import os
44
from glob import glob
5+
import platform
6+
import sys
57

68

79
import numpy as np
@@ -20,6 +22,8 @@
2022
'こんにちは世界', '世界,你好!', 'Helló, világ!', 'Zdravo svete!',
2123
'เฮลโลเวิลด์']
2224

25+
is_wasm = (sys.platform == 'emscripten') or (platform.machine() in ['wasm32', 'wasm64'])
26+
2327

2428
def compare_arrays(arr, res, precision=None):
2529

0 commit comments

Comments
 (0)