Skip to content

Commit

Permalink
python3.pkgs.numpy: use pytestCheckHook
Browse files Browse the repository at this point in the history
Related to: NixOS#255262 and a
follow-up to NixOS#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
  • Loading branch information
doronbehar committed Sep 20, 2023
1 parent 6096abb commit 8b1886c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkgs/development/python-modules/numpy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
, gfortran
, hypothesis
, pytestCheckHook
, pytest-xdist
, typing-extensions
, blas
, lapack
Expand Down Expand Up @@ -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"
'';
Expand Down Expand Up @@ -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/";
Expand Down

0 comments on commit 8b1886c

Please sign in to comment.