nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, chardet
4, fetchPypi
5, jinja2
6, jinja2_pluralize
7, pluggy
8, pycodestyle
9, pyflakes
10, pygments
11, pylint
12, pytest-datadir
13, pytest-mock
14, pytestCheckHook
15, pythonOlder
16, tomli
17}:
18
19buildPythonPackage rec {
20 pname = "diff-cover";
21 version = "6.5.0";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.6";
25
26 src = fetchPypi {
27 pname = "diff_cover";
28 inherit version;
29 hash = "sha256-N2O0/C75EGO6crUCFGUiJLLQqfMVRNVQRZb1xKhHzXs=";
30 };
31
32 propagatedBuildInputs = [
33 chardet
34 jinja2
35 jinja2_pluralize
36 pluggy
37 pygments
38 tomli
39 ];
40
41 checkInputs = [
42 pycodestyle
43 pyflakes
44 pylint
45 pytest-datadir
46 pytest-mock
47 pytestCheckHook
48 ];
49
50 disabledTests = [
51 # Tests check for flake8
52 "file_does_not_exist"
53 # AssertionError: assert '.c { color:...
54 "test_style_defs"
55 # uses pytest.approx in a boolean context, which is unsupported since pytest7
56 "test_percent_covered"
57 # assert '<!DOCTYPE ht...ody>\n</html>' == '<!DOCTYPE ht...ody>\n</html>'
58 "test_html_with_external_css"
59 # assert '<table class...</tr></table>' == '<div class=".../table></div>'
60 "test_format"
61 "test_format_with_invalid_violation_lines"
62 "test_no_filename_ext"
63 "test_unicode"
64 "test_load_snippets_html"
65 "test_load_utf8_snippets"
66 "test_load_declared_arabic"
67 ];
68
69 pythonImportsCheck = [
70 "diff_cover"
71 ];
72
73 meta = with lib; {
74 description = "Automatically find diff lines that need test coverage";
75 homepage = "https://github.com/Bachmann1234/diff-cover";
76 license = licenses.asl20;
77 maintainers = with maintainers; [ dzabraev ];
78 };
79}