python3Packages.fs: fix tests on darwin
Refactors to pytestCheckHook and removes unused nose dependency.
This commit is contained in:
parent
3d048b1bee
commit
66afda2857
1 changed files with 15 additions and 5 deletions
|
@ -3,7 +3,6 @@
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, six
|
, six
|
||||||
, nose
|
|
||||||
, appdirs
|
, appdirs
|
||||||
, scandir
|
, scandir
|
||||||
, backports_os
|
, backports_os
|
||||||
|
@ -15,7 +14,8 @@
|
||||||
, mock
|
, mock
|
||||||
, pythonAtLeast
|
, pythonAtLeast
|
||||||
, isPy3k
|
, isPy3k
|
||||||
, pytest
|
, pytestCheckHook
|
||||||
|
, stdenv
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -28,7 +28,7 @@ buildPythonPackage rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ glibcLocales ];
|
buildInputs = [ glibcLocales ];
|
||||||
checkInputs = [ nose pyftpdlib mock psutil pytest ];
|
checkInputs = [ pyftpdlib mock psutil pytestCheckHook ];
|
||||||
propagatedBuildInputs = [ six appdirs pytz ]
|
propagatedBuildInputs = [ six appdirs pytz ]
|
||||||
++ lib.optionals (!isPy3k) [ backports_os ]
|
++ lib.optionals (!isPy3k) [ backports_os ]
|
||||||
++ lib.optionals (!pythonAtLeast "3.6") [ typing ]
|
++ lib.optionals (!pythonAtLeast "3.6") [ typing ]
|
||||||
|
@ -37,10 +37,20 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
LC_ALL="en_US.utf-8";
|
LC_ALL="en_US.utf-8";
|
||||||
|
|
||||||
checkPhase = ''
|
preCheck = ''
|
||||||
HOME=$(mktemp -d) pytest -k 'not user_data_repr' --ignore=tests/test_opener.py
|
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; {
|
meta = with lib; {
|
||||||
description = "Filesystem abstraction";
|
description = "Filesystem abstraction";
|
||||||
homepage = "https://github.com/PyFilesystem/pyfilesystem2";
|
homepage = "https://github.com/PyFilesystem/pyfilesystem2";
|
||||||
|
|
Loading…
Reference in a new issue