diff --git a/tests/conftest.py b/tests/conftest.py index 8389f8c8..35768f59 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,6 +6,7 @@ # LICENSE file in the root directory of this source tree) ####################################################################### import os +import sys import pytest @@ -14,6 +15,15 @@ def pytest_configure(config): blosc2.print_versions() + if sys.platform != "emscripten": + # Using the defaults for nthreads can be very time consuming for tests. + # Fastest runtime (95 sec) for the whole test suite (Mac Mini M4 Pro) + # blosc2.set_nthreads(1) + # Second best runtime (101 sec), but still contained, and + # actually tests multithreading. + blosc2.set_nthreads(2) + # This makes the worst time (242 sec) + # blosc2.set_nthreads(blosc2.nthreads) # worst runtime () @pytest.fixture(scope="session")