From 3cd3e3167ce0f54115a929d817ead1c51a6b4cb8 Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Wed, 24 Mar 2021 11:11:11 -0400 Subject: [PATCH] python3Packages.prance: unbreak --- .../python-modules/prance/default.nix | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/prance/default.nix b/pkgs/development/python-modules/prance/default.nix index 3c9bc5c7c5ba..f9d5b6f80b1f 100644 --- a/pkgs/development/python-modules/prance/default.nix +++ b/pkgs/development/python-modules/prance/default.nix @@ -6,10 +6,9 @@ , requests , six , semver -, pytest +, pytestCheckHook , pytestcov , pytestrunner -, sphinx , openapi-spec-validator }: @@ -35,18 +34,28 @@ buildPythonPackage rec { ]; checkInputs = [ - pytest + pytestCheckHook pytestcov openapi-spec-validator ]; postPatch = '' substituteInPlace setup.py \ - --replace "tests_require = dev_require," "tests_require = None," + --replace "tests_require = dev_require," "tests_require = None," \ + --replace "chardet~=4.0" "" \ + --replace "semver~=2.13" "" + substituteInPlace setup.cfg \ + --replace "--cov-fail-under=90" "" ''; - # many tests require network connection - doCheck = false; + # Disable tests that require network + disabledTestPaths = [ + "tests/test_convert.py" + ]; + disabledTests = [ + "test_fetch_url_http" + ]; + pythonImportsCheck = [ "prance" ]; meta = with lib; { description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser";