From 8b1886cf9ec92e4f90dd965a33b22f941b1ffd39 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 17 Sep 2023 10:35:47 +0300 Subject: [PATCH] python3.pkgs.numpy: use pytestCheckHook Related to: https://github.com/NixOS/nixpkgs/issues/255262 and a follow-up to https://github.com/NixOS/nixpkgs/pull/251923 : - The NOSE_EXCLUDE environment variable was removed due to being unneeded, as upstream uses pytest for a long time now, and that disabled test was removed since. - Support parallel testing with pytest-xdist --- pkgs/development/python-modules/numpy/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/numpy/default.nix b/pkgs/development/python-modules/numpy/default.nix index c1cd59bc62ed7cf..abd877d128e0051 100644 --- a/pkgs/development/python-modules/numpy/default.nix +++ b/pkgs/development/python-modules/numpy/default.nix @@ -7,6 +7,7 @@ , gfortran , hypothesis , pytestCheckHook +, pytest-xdist , typing-extensions , blas , lapack @@ -102,10 +103,14 @@ in buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook + # Parallelises tests a bit + pytest-xdist hypothesis typing-extensions ]; + # Getting import errors without this. A common issue in Nixpkgs, investigated + # at: https://github.com/NixOS/nixpkgs/issues/255262 preCheck = '' cd "$out" ''; @@ -143,10 +148,6 @@ in buildPythonPackage rec { inherit cfg; }; - # Disable test - # - test_large_file_support: takes a long time and can cause the machine to run out of disk space - NOSE_EXCLUDE="test_large_file_support"; - meta = { description = "Scientific tools for Python"; homepage = "https://numpy.org/";