2019-10-17 23:43:16 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi
|
|
|
|
, inflect
|
|
|
|
, jinja2
|
|
|
|
, jinja2_pluralize
|
|
|
|
, pygments
|
|
|
|
, six
|
|
|
|
# test dependencies
|
|
|
|
, coverage
|
|
|
|
, flake8
|
|
|
|
, mock
|
|
|
|
, nose
|
|
|
|
, pycodestyle
|
|
|
|
, pyflakes
|
|
|
|
, pylint
|
|
|
|
, pytest
|
|
|
|
}:
|
2018-01-19 16:23:50 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "diff_cover";
|
2020-01-22 12:26:40 +00:00
|
|
|
version = "2.5.2";
|
2018-01-19 16:23:50 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export LC_ALL=en_US.UTF-8;
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-01-22 12:26:40 +00:00
|
|
|
sha256 = "09pgzx2m04hzpckwgz4iz9590ll5fk1mirlra89qps8ig1xmz5m5";
|
2018-01-19 16:23:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ jinja2 jinja2_pluralize pygments six inflect ];
|
|
|
|
|
2019-10-17 23:43:16 +01: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'
|
|
|
|
'';
|
2018-01-19 16:23:50 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Automatically find diff lines that need test coverage";
|
|
|
|
homepage = https://github.com/Bachmann1234/diff-cover;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ dzabraev ];
|
|
|
|
};
|
|
|
|
}
|