From 2a6ac7428ab98af2776f45f6a06b1ae496d971ba Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 13 Apr 2021 13:43:20 +0200 Subject: [PATCH] python3Packages.swisshydrodata:: enable tests --- .../python-modules/swisshydrodata/default.nix | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/swisshydrodata/default.nix b/pkgs/development/python-modules/swisshydrodata/default.nix index 6ab128e9222f..f9464382c4c0 100644 --- a/pkgs/development/python-modules/swisshydrodata/default.nix +++ b/pkgs/development/python-modules/swisshydrodata/default.nix @@ -1,22 +1,31 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, pytestCheckHook , requests +, requests-mock }: buildPythonPackage rec { pname = "swisshydrodata"; version = "0.1.0"; - src = fetchPypi { - inherit pname version; - sha256 = "0z8divdpdrjllf6y19kdrv19m7aqkbyxz43ml3d7hgaa6mj91mg5"; + src = fetchFromGitHub { + owner = "Bouni"; + repo = pname; + rev = version; + sha256 = "1rdgfc6zg5j3fvrpbqs9vc3n5m66r5yljawyl7nmrqd5lwq1lqak"; }; - propagatedBuildInputs = [ requests ]; + propagatedBuildInputs = [ + requests + ]; + + checkInputs = [ + pytestCheckHook + requests-mock + ]; - # Tests are not releases at the moment - doCheck = false; pythonImportsCheck = [ "swisshydrodata" ]; meta = with lib; {