From 70b54ac1cdde89eea086682979227fdd9f826645 Mon Sep 17 00:00:00 2001 From: Matej Urbas Date: Sun, 17 Jan 2021 11:08:56 +0000 Subject: [PATCH 1/2] python3Packages.hug: disable broken marshmallow tests --- .../python-modules/hug/default.nix | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/hug/default.nix b/pkgs/development/python-modules/hug/default.nix index 6769b5371b8..839c0ce387c 100644 --- a/pkgs/development/python-modules/hug/default.nix +++ b/pkgs/development/python-modules/hug/default.nix @@ -2,7 +2,7 @@ , falcon , pytestrunner , requests -, pytest +, pytestCheckHook , marshmallow , mock , numpy @@ -20,19 +20,29 @@ buildPythonPackage rec { sha256 = "05rsv16g7ph100p8kl4l2jba0y4wcpp3xblc02mfp67zp1279vaq"; }; - nativeBuildInputs = [ pytestrunner ]; propagatedBuildInputs = [ falcon requests ]; - checkInputs = [ mock marshmallow pytest numpy ]; - checkPhase = '' - mv hug hug.hidden - # some tests attempt network access - PATH=$out/bin:$PATH pytest -k "not (test_request or test_datagram_request)" + checkInputs = [ mock marshmallow pytestCheckHook pytestrunner numpy ]; + + preCheck = '' + # some tests need the `hug` CLI on the PATH + export PATH=$out/bin:$PATH ''; + disabledTests = [ + # some tests attempt network access + "test_datagram_request" + "test_request" + # these tests use an unstable test dependency (https://github.com/hugapi/hug/issues/859) + "test_marshmallow_custom_context" + "test_marshmallow_schema" + "test_transform" + "test_validate_route_args_negative_case" + ]; + meta = with lib; { description = "A Python framework that makes developing APIs as simple as possible, but no simpler"; - homepage = "https://github.com/timothycrosley/hug"; + homepage = "https://github.com/hugapi/hug"; license = licenses.mit; }; From 8efbb2791d0d453a2145d421a42c97f835c2044d Mon Sep 17 00:00:00 2001 From: Matej Urbas Date: Sun, 17 Jan 2021 15:26:33 +0000 Subject: [PATCH 2/2] fixup! removes pytest-runner dependency from setup.py --- pkgs/development/python-modules/hug/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/hug/default.nix b/pkgs/development/python-modules/hug/default.nix index 839c0ce387c..872798c6ced 100644 --- a/pkgs/development/python-modules/hug/default.nix +++ b/pkgs/development/python-modules/hug/default.nix @@ -1,6 +1,5 @@ { lib , buildPythonPackage, fetchFromGitHub, isPy27 , falcon -, pytestrunner , requests , pytestCheckHook , marshmallow @@ -22,7 +21,11 @@ buildPythonPackage rec { propagatedBuildInputs = [ falcon requests ]; - checkInputs = [ mock marshmallow pytestCheckHook pytestrunner numpy ]; + checkInputs = [ mock marshmallow pytestCheckHook numpy ]; + + postPatch = '' + substituteInPlace setup.py --replace '"pytest-runner"' "" + ''; preCheck = '' # some tests need the `hug` CLI on the PATH