summary refs log tree commit diff
path: root/pkgs/development/python-modules/pandas
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2021-01-11 19:15:31 -0800
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-01-11 23:58:03 -0800
commit3fe3dcd92e309eda64fc39d7ed0cdbcda306474e (patch)
treeb41d3c796dd31cec0832aecc542bf85aeea4ad09 /pkgs/development/python-modules/pandas
parent02f64b7081a63921ff6cc57dc84af294089dd8da (diff)
downloadnixpkgs-3fe3dcd92e309eda64fc39d7ed0cdbcda306474e.tar
nixpkgs-3fe3dcd92e309eda64fc39d7ed0cdbcda306474e.tar.gz
nixpkgs-3fe3dcd92e309eda64fc39d7ed0cdbcda306474e.tar.bz2
nixpkgs-3fe3dcd92e309eda64fc39d7ed0cdbcda306474e.tar.lz
nixpkgs-3fe3dcd92e309eda64fc39d7ed0cdbcda306474e.tar.xz
nixpkgs-3fe3dcd92e309eda64fc39d7ed0cdbcda306474e.tar.zst
nixpkgs-3fe3dcd92e309eda64fc39d7ed0cdbcda306474e.zip
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
Diffstat (limited to 'pkgs/development/python-modules/pandas')
-rw-r--r--pkgs/development/python-modules/pandas/default.nix4
1 files changed, 3 insertions, 1 deletions
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
   ''