Skip to content

Commit

Permalink
python3Packages.curio: fix tests on darwin
Browse files Browse the repository at this point in the history
Refactors to pytestCheckHook.
  • Loading branch information
Thibault Gagnaux authored and Jon committed Sep 26, 2020
1 parent c4d016a commit 22cd2a2
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions pkgs/development/python-modules/curio/default.nix
Expand Up @@ -2,8 +2,9 @@
, buildPythonPackage
, fetchPypi
, isPy3k
, pytest
, pytestCheckHook
, sphinx
, stdenv
}:

buildPythonPackage rec {
Expand All @@ -17,15 +18,18 @@ buildPythonPackage rec {

disabled = !isPy3k;

checkInputs = [ pytest sphinx ];
checkInputs = [ pytestCheckHook sphinx ];

__darwinAllowLocalNetworking = true;

# test_aside_basic times out,
# test_aside_cancel fails because modifies PYTHONPATH and cant find pytest
checkPhase = ''
pytest --deselect tests/test_task.py::test_aside_basic --deselect tests/test_task.py::test_aside_cancel -k "not test_ssl_outgoing"
'';
disabledTests = [
"test_aside_basic" # times out
"test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest
"test_ssl_outgoing" # touches network
] ++ lib.optionals (stdenv.isDarwin) [
"test_unix_echo" # socket bind error on hydra when built with other packages
"test_unix_ssl_server" # socket bind error on hydra when built with other packages
];

meta = with lib; {
homepage = "https://github.com/dabeaz/curio";
Expand Down

0 comments on commit 22cd2a2

Please sign in to comment.