pythonPackages.pydocstyle: enable tests

This commit is contained in:
Robert Schütz 2018-03-01 11:13:09 +01:00 committed by Robin Gloster
parent 13ac2ee2f6
commit ca09d1b303

View File

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k { lib, buildPythonPackage, fetchFromGitHub, isPy3k
, snowballstemmer, six, configparser , snowballstemmer, six, configparser
, pytest, pytestpep8, mock, pathlib }: , pytest, pytestpep8, mock, pathlib }:
@ -6,15 +6,24 @@ buildPythonPackage rec {
pname = "pydocstyle"; pname = "pydocstyle";
version = "2.1.1"; version = "2.1.1";
src = fetchPypi { # no tests on PyPI
inherit pname version; # https://github.com/PyCQA/pydocstyle/issues/302
sha256 = "15ssv8l6cvrmzgwcdzw76rnl4np3qf0dbwr1wsx76y0hc7lwsnsd"; src = fetchFromGitHub {
owner = "PyCQA";
repo = pname;
rev = version;
sha256 = "1h0k8lpx14svc8dini62j0kqiam10pck5sdzvxa4xhsx7y689g5l";
}; };
propagatedBuildInputs = [ snowballstemmer six ] ++ lib.optional (!isPy3k) configparser; propagatedBuildInputs = [ snowballstemmer six ] ++ lib.optional (!isPy3k) configparser;
checkInputs = [ pytest pytestpep8 mock pathlib ]; checkInputs = [ pytest pytestpep8 mock pathlib ];
checkPhase = ''
# test_integration.py installs packages via pip
py.test --pep8 --cache-clear -vv src/tests -k "not test_integration"
'';
meta = with lib; { meta = with lib; {
description = "Python docstring style checker"; description = "Python docstring style checker";
homepage = https://github.com/PyCQA/pydocstyle/; homepage = https://github.com/PyCQA/pydocstyle/;