python314Packages.xarray: add pytest-xdist to speed up tests by 2x

This commit is contained in:
Sandro Jäckel
2026-06-23 16:46:03 +02:00
parent 6f7dde8641
commit 0515e4e0f1
@@ -7,7 +7,7 @@
setuptools,
setuptools-scm,
# dependenices
# dependencies
numpy,
packaging,
pandas,
@@ -32,6 +32,7 @@
# tests
pytest-asyncio,
pytest-xdist,
pytestCheckHook,
h5py,
}:
@@ -98,8 +99,14 @@ buildPythonPackage (finalAttrs: {
accel ++ io ++ etc ++ parallel ++ viz;
};
preCheck = ''
# tests become flaky with to many cores
export NIX_BUILD_CORES=$((NIX_BUILD_CORES > 8 ? 8 : NIX_BUILD_CORES))
'';
nativeCheckInputs = [
pytest-asyncio
pytest-xdist
pytestCheckHook
]
# Besides scipy, these are not strictly needed for the tests, but adding all