From 22cd2a23bf8437fc9025239b2beba8d8519c401f Mon Sep 17 00:00:00 2001 From: Thibault Gagnaux Date: Sat, 26 Sep 2020 18:30:57 +0200 Subject: [PATCH] python3Packages.curio: fix tests on darwin Refactors to pytestCheckHook. --- .../python-modules/curio/default.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/curio/default.nix b/pkgs/development/python-modules/curio/default.nix index 5852f518ab5..0ffd66d6d01 100644 --- a/pkgs/development/python-modules/curio/default.nix +++ b/pkgs/development/python-modules/curio/default.nix @@ -2,8 +2,9 @@ , buildPythonPackage , fetchPypi , isPy3k -, pytest +, pytestCheckHook , sphinx +, stdenv }: buildPythonPackage rec { @@ -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";