From ab7068523804ac953849b2d8de7a6b4ee178a28f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 7 Jul 2021 16:40:06 +0200 Subject: [PATCH] python3Packages.httmock: enable tests --- .../python-modules/httmock/default.nix | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/httmock/default.nix b/pkgs/development/python-modules/httmock/default.nix index 8976afaf852e..7928189c7cd1 100644 --- a/pkgs/development/python-modules/httmock/default.nix +++ b/pkgs/development/python-modules/httmock/default.nix @@ -1,7 +1,12 @@ -{ lib, buildPythonPackage, fetchFromGitHub, requests }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, requests +, pytestCheckHook +}: buildPythonPackage rec { - pname = "httmock"; + pname = "httmock"; version = "1.4.0"; src = fetchFromGitHub { @@ -11,12 +16,19 @@ buildPythonPackage rec { sha256 = "sha256-yid4vh1do0zqVzd1VV7gc+Du4VPrkeGFsDHqNbHL28I="; }; - checkInputs = [ requests ]; + checkInputs = [ + requests + pytestCheckHook + ]; + + pytestFlagsArray = [ "tests.py" ]; + + pythonImportsCheck = [ "httmock" ]; meta = with lib; { description = "A mocking library for requests"; - homepage = "https://github.com/patrys/httmock"; - license = licenses.asl20; + homepage = "https://github.com/patrys/httmock"; + license = licenses.asl20; maintainers = with maintainers; [ nyanloutre ]; }; }