2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi
|
2021-04-26 19:14:03 +00:00
|
|
|
, chardet
|
2020-04-24 23:36:52 +00:00
|
|
|
, inflect
|
|
|
|
, jinja2
|
|
|
|
, jinja2_pluralize
|
|
|
|
, pygments
|
|
|
|
, six
|
|
|
|
# test dependencies
|
|
|
|
, coverage
|
|
|
|
, mock
|
|
|
|
, nose
|
|
|
|
, pycodestyle
|
|
|
|
, pyflakes
|
|
|
|
, pylint
|
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "diff_cover";
|
2021-04-26 19:14:03 +00:00
|
|
|
version = "5.0.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export LC_ALL=en_US.UTF-8;
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-26 19:14:03 +00:00
|
|
|
sha256 = "e80f7a4979b7a9d373903776588279ed2898f17729e608255c4119462c822edb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
propagatedBuildInputs = [ chardet jinja2 jinja2_pluralize pygments six inflect ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [ mock coverage pytest nose pylint pyflakes pycodestyle ];
|
|
|
|
|
|
|
|
# ignore tests which try to write files
|
|
|
|
checkPhase = ''
|
|
|
|
pytest -k 'not added_file_pylint_console and not file_does_not_exist'
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Automatically find diff lines that need test coverage";
|
|
|
|
homepage = "https://github.com/Bachmann1234/diff-cover";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ dzabraev ];
|
|
|
|
};
|
|
|
|
}
|