1{
2 lib,
3 allpairspy,
4 approval-utilities,
5 beautifulsoup4,
6 buildPythonPackage,
7 empty-files,
8 fetchFromGitHub,
9 mock,
10 numpy,
11 pyperclip,
12 pytest,
13 pytest-asyncio,
14 pytestCheckHook,
15 pyyaml,
16 setuptools,
17 testfixtures,
18 typing-extensions,
19}:
20
21buildPythonPackage rec {
22 pname = "approvaltests";
23 version = "15.3.2";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "approvals";
28 repo = "ApprovalTests.Python";
29 tag = "v${version}";
30 hash = "sha256-cOaL8u5q9kx+yLB0e/ALnGYYGF5v50wsIIF1UUTPe1Y=";
31 };
32
33 postPatch = ''
34 echo 'version_number = "${version}"' > version.py
35 mv .github approvaltests approval_utilities tests setup
36 cd setup
37 rm setup.cfg
38 '';
39
40 build-system = [ setuptools ];
41
42 dependencies = [
43 allpairspy
44 approval-utilities
45 beautifulsoup4
46 empty-files
47 mock
48 pyperclip
49 pytest
50 testfixtures
51 typing-extensions
52 ];
53
54 nativeCheckInputs = [
55 numpy
56 pytest-asyncio
57 pytestCheckHook
58 pyyaml
59 ];
60
61 disabledTests = [
62 "test_warnings"
63 # test runs another python interpreter, ignoring $PYTHONPATH
64 "test_command_line_verify"
65 ];
66
67 pythonImportsCheck = [
68 "approvaltests.approvals"
69 "approvaltests.reporters.generic_diff_reporter_factory"
70 ];
71
72 meta = {
73 description = "Assertion/verification library to aid testing";
74 homepage = "https://github.com/approvals/ApprovalTests.Python";
75 changelog = "https://github.com/approvals/ApprovalTests.Python/releases/tag/${src.tag}";
76 license = lib.licenses.asl20;
77 maintainers = [ ];
78 };
79}