Skip to content

Commit 850bcfd

Browse files
committed
Only set the number of threads when not in an emscripten platform
1 parent 442cd41 commit 850bcfd

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

tests/conftest.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# LICENSE file in the root directory of this source tree)
77
#######################################################################
88
import os
9+
import sys
910

1011
import pytest
1112

@@ -14,14 +15,15 @@
1415

1516
def pytest_configure(config):
1617
blosc2.print_versions()
17-
# Using the defaults for nthreads can be very time consuming for tests.
18-
# Fastest runtime (95 sec) for the whole test suite (Mac Mini M4 Pro)
19-
# blosc2.set_nthreads(1)
20-
# Second best runtime (101 sec), but still contained, and
21-
# actually tests multithreading.
22-
blosc2.set_nthreads(2)
23-
# This makes the worst time (242 sec)
24-
# blosc2.set_nthreads(blosc2.nthreads) # worst runtime ()
18+
if sys.platform != "emscripten":
19+
# Using the defaults for nthreads can be very time consuming for tests.
20+
# Fastest runtime (95 sec) for the whole test suite (Mac Mini M4 Pro)
21+
# blosc2.set_nthreads(1)
22+
# Second best runtime (101 sec), but still contained, and
23+
# actually tests multithreading.
24+
blosc2.set_nthreads(2)
25+
# This makes the worst time (242 sec)
26+
# blosc2.set_nthreads(blosc2.nthreads) # worst runtime ()
2527

2628

2729
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)