From e78f2518fc5f455fc50108073caa11d61df256b4 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 11 Mar 2023 09:19:57 +0300 Subject: [PATCH] python3Packages.flask-expects-json: run some more tests Co-authored-by: Fabian Affolter --- .../flask-expects-json/default.nix | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/flask-expects-json/default.nix b/pkgs/development/python-modules/flask-expects-json/default.nix index cd08050f7e96..fd608b504451 100644 --- a/pkgs/development/python-modules/flask-expects-json/default.nix +++ b/pkgs/development/python-modules/flask-expects-json/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , flask , jsonschema +, pytestCheckHook }: buildPythonPackage rec { @@ -17,10 +18,31 @@ buildPythonPackage rec { hash = "sha256-CUxuwqjjAb9Fy6xWtX1WtSANYaYr5//vY8k89KghYoQ="; }; - propagatedBuildInputs = [ flask jsonschema ]; + propagatedBuildInputs = [ + flask + jsonschema + ] ++ flask.optional-dependencies.async; - # tests aren't included in sdist and don't pass on current flask - doCheck = false; + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "flask_expects_json" + ]; + + disabledTests = [ + # https://github.com/Fischerfredl/flask-expects-json/issues/26 + "test_check_mimetype" + "test_default_behaviour" + "test_default_gets_validated" + "test_format_validation_rejection" + "test_ignore_multiple" + "test_ignore_one" + "test_valid_decorator_no_schema_async" + "test_valid_decorator" + "test_validation_invalid" + ]; meta = with lib; { homepage = "https://github.com/fischerfredl/flask-expects-json";