diff --git a/pkgs/development/python-modules/cytoolz/default.nix b/pkgs/development/python-modules/cytoolz/default.nix index 70c7e6f3c9fa..9b1b9ecb8da6 100644 --- a/pkgs/development/python-modules/cytoolz/default.nix +++ b/pkgs/development/python-modules/cytoolz/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchPypi , isPyPy -, nose +, pytestCheckHook , toolz , python , isPy27 @@ -18,13 +18,17 @@ buildPythonPackage rec { sha256 = "ea23663153806edddce7e4153d1d407d62357c05120a4e8485bddf1bd5ab22b4"; }; - checkInputs = [ nose ]; propagatedBuildInputs = [ toolz ]; - checkPhase = '' - nosetests -v $out/${python.sitePackages} + # tests are located in cytoolz/tests, however we can't import cytoolz + # from $PWD, as it will break relative imports + preCheck = '' + cd cytoolz + export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH ''; + checkInputs = [ pytestCheckHook ]; + meta = { homepage = "https://github.com/pytoolz/cytoolz/"; description = "Cython implementation of Toolz: High performance functional utilities";