git.iko.soy/typeable/nixpkgs
on master help sign in
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

commit3fe3dcd92e309eda64fc39d7ed0cdbcda306474e authorJonathan Ringer <jonringer117@gmail.com> dateMon 11 Jan 2021, 19:15 (6 years ago) parent02f64b7
1 file changed+3−1
pkgs/development/python-modules/pandas/default.nix+3−1
pkgs/development/python-modules/pandas/default.nix+3−1
@@ -85,7 +85,6 @@ in buildPythonPackage rec {
8585 doCheck = !stdenv.isAarch64; # upstream doesn't test this architecture
8686
8787 pytestFlagsArray = [
88− "$out/${python.sitePackages}/pandas"
8988 "--skip-slow"
9089 "--skip-network"
9190 ];
@@ -120,7 +119,10 @@ in buildPythonPackage rec {
120119 "test_clipboard"
121120 ];
122121
122+ # tests have relative paths, and need to reference compiled C extensions
123+ # so change directory where `import .test` is able to be resolved
123124 preCheck = ''
125+ cd $out/${python.sitePackages}/pandas
124126 export LC_ALL="en_US.UTF-8"
125127 PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
126128 ''