diff options
author | Thibault Gagnaux <thibault@gagnaux.ch> | 2020-09-24 08:29:42 +0200 |
---|---|---|
committer | Thibault Gagnaux <thibault@gagnaux.ch> | 2020-09-29 14:59:35 +0200 |
commit | 66afda2857615b083491bf8827d1624cd24791c7 (patch) | |
tree | bc3524dd9d04eb3973dd162c2659d410185c943f /pkgs/development/python-modules/fs | |
parent | 3d048b1beeb41e5ee784eaddabad6e551cdfbbd4 (diff) |
python3Packages.fs: fix tests on darwin
Refactors to pytestCheckHook and removes unused nose dependency.
Diffstat (limited to 'pkgs/development/python-modules/fs')
-rw-r--r-- | pkgs/development/python-modules/fs/default.nix | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/fs/default.nix b/pkgs/development/python-modules/fs/default.nix index ff6ce57aefa80..77aee7a3bdfe5 100644 --- a/pkgs/development/python-modules/fs/default.nix +++ b/pkgs/development/python-modules/fs/default.nix @@ -3,7 +3,6 @@ , buildPythonPackage , fetchPypi , six -, nose , appdirs , scandir , backports_os @@ -15,7 +14,8 @@ , mock , pythonAtLeast , isPy3k -, pytest +, pytestCheckHook +, stdenv }: buildPythonPackage rec { @@ -28,7 +28,7 @@ buildPythonPackage rec { }; buildInputs = [ glibcLocales ]; - checkInputs = [ nose pyftpdlib mock psutil pytest ]; + checkInputs = [ pyftpdlib mock psutil pytestCheckHook ]; propagatedBuildInputs = [ six appdirs pytz ] ++ lib.optionals (!isPy3k) [ backports_os ] ++ lib.optionals (!pythonAtLeast "3.6") [ typing ] @@ -37,10 +37,20 @@ buildPythonPackage rec { LC_ALL="en_US.utf-8"; - checkPhase = '' - HOME=$(mktemp -d) pytest -k 'not user_data_repr' --ignore=tests/test_opener.py + preCheck = '' + HOME=$(mktemp -d) ''; + pytestFlagsArray = [ "--ignore=tests/test_opener.py" ]; + + disabledTests = [ + "user_data_repr" + ] ++ lib.optionals (stdenv.isDarwin) [ # remove if https://github.com/PyFilesystem/pyfilesystem2/issues/430#issue-707878112 resolved + "test_ftpfs" + ]; + + __darwinAllowLocalNetworking = true; + meta = with lib; { description = "Filesystem abstraction"; homepage = "https://github.com/PyFilesystem/pyfilesystem2"; |