From 3fe3dcd92e309eda64fc39d7ed0cdbcda306474e Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Mon, 11 Jan 2021 19:15:31 -0800 Subject: [PATCH] python3Packages.pandas: fix tests Tests now have relative imports to other test files, so pytest needs to be executed in the $out/${python.sitePackages}/pandas directory to make these assumptions valid --- pkgs/development/python-modules/pandas/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index 3db271ee998..b9865fe628b 100644 --- a/pkgs/development/python-modules/pandas/default.nix +++ b/pkgs/development/python-modules/pandas/default.nix @@ -85,7 +85,6 @@ in buildPythonPackage rec { doCheck = !stdenv.isAarch64; # upstream doesn't test this architecture pytestFlagsArray = [ - "$out/${python.sitePackages}/pandas" "--skip-slow" "--skip-network" ]; @@ -120,7 +119,10 @@ in buildPythonPackage rec { "test_clipboard" ]; + # tests have relative paths, and need to reference compiled C extensions + # so change directory where `import .test` is able to be resolved preCheck = '' + cd $out/${python.sitePackages}/pandas export LC_ALL="en_US.UTF-8" PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH ''