From e9aaf1074ed9675a8d1055d8f6fbef21ebca9252 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 18 Feb 2022 10:33:53 +0100 Subject: python3Packages.braintree: enable tests --- .../python-modules/braintree/default.nix | 41 ++++++++++++++++------ 1 file changed, 31 insertions(+), 10 deletions(-) (limited to 'pkgs/development/python-modules/braintree') diff --git a/pkgs/development/python-modules/braintree/default.nix b/pkgs/development/python-modules/braintree/default.nix index 1d5867e969df6..c88f6712f7967 100644 --- a/pkgs/development/python-modules/braintree/default.nix +++ b/pkgs/development/python-modules/braintree/default.nix @@ -1,22 +1,43 @@ -{ lib, - fetchPypi, - requests, - buildPythonPackage +{ lib +, buildPythonPackage +, fetchFromGitHub +, nose +, pytestCheckHook +, pythonOlder +, requests }: buildPythonPackage rec { pname = "braintree"; version = "4.14.0"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-0gnlb5m6KQArdwaZoFF6dcvAL3iQJiZTgLVMQp/EoBE="; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = pname; + repo = "braintree_python"; + rev = version; + hash = "sha256-qeqQX+qyy78sLe+46CA4D6VAxNHUVahS4LMYdGDzc2k="; }; - propagatedBuildInputs = [ requests ]; + propagatedBuildInputs = [ + requests + ]; + + checkInputs = [ + nose + pytestCheckHook + ]; + + pythonImportsCheck = [ + "braintree" + ]; - # pypi release does not include tests - doCheck = false; + disabledTestPaths = [ + # Don't test integrations + "tests/integration" + ]; meta = with lib; { description = "Python library for integration with Braintree"; -- cgit 1.4.1