From 5eb123c36504ff166c89aa68f542f34d9045ad9f Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 14 Apr 2022 04:39:52 +0200 Subject: [PATCH] python3Packages.approvaltests: 4.0.0 -> 5.0.0 --- .../python-modules/approvaltests/default.nix | 42 ++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/approvaltests/default.nix b/pkgs/development/python-modules/approvaltests/default.nix index ece87d1894e0..a6c94f244425 100644 --- a/pkgs/development/python-modules/approvaltests/default.nix +++ b/pkgs/development/python-modules/approvaltests/default.nix @@ -1,36 +1,58 @@ -{ lib, buildPythonPackage, fetchFromGitHub +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder + +# propagates +, allpairspy , beautifulsoup4 , empty-files -, numpy , pyperclip , pytest + +# tests +, numpy +, pytestCheckHook }: buildPythonPackage rec { - version = "4.0.0"; + version = "5.0.0"; pname = "approvaltests"; + format = "setuptools"; + + disabled = pythonOlder "3.6.1"; # no tests included in PyPI tarball src = fetchFromGitHub { owner = "approvals"; repo = "ApprovalTests.Python"; rev = "v${version}"; - sha256 = "sha256-4dg5xTswqLFRBaZagKrkilCvsAnky9donb03MT/PiWM="; + sha256 = "sha256-ku8J1ccX6LZZitlAOgc3eNCdsFx/FP1nqtdgPJF/jRg="; }; propagatedBuildInputs = [ + allpairspy beautifulsoup4 empty-files - numpy pyperclip pytest ]; - postPatch = '' - substituteInPlace setup.py \ - --replace bs4 beautifulsoup4 \ - --replace "pyperclip==1.5.27" "pyperclip>=1.5.27" - ''; + checkInputs = [ + numpy + pytestCheckHook + ]; + + disabledTests = [ + # tests expects paths below ApprovalTests.Python directory + "test_received_filename" + "test_pytest_namer" + ]; + + pythonImportsCheck = [ + "approvaltests.approvals" + "approvaltests.reporters.generic_diff_reporter_factory" + ]; meta = with lib; { description = "Assertion/verification library to aid testing";