python3Packages.titlecase: enable tests

This commit is contained in:
Fabian Affolter
2021-10-13 23:19:48 +02:00
parent 1aac6f3b28
commit 1b58f82701
@@ -1,24 +1,44 @@
{ buildPythonPackage, lib, fetchPypi, regex }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, regex
}:
buildPythonPackage rec {
pname = "titlecase";
version = "2.3";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "9a1595ed9b88f3ce4362a7602ee63cf074e10ac80d1256b32ea1ec5ffa265fa0";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "ppannuto";
repo = "python-titlecase";
rev = "v${version}";
sha256 = "169ywzn5wfzwyknqavspkdpwbx31nycxsxkl7iywwk71gs1lskkw";
};
propagatedBuildInputs = [ regex ];
propagatedBuildInputs = [
regex
];
# no tests run
doCheck = false;
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "titlecase" ];
pytestFlagsArray = [
"titlecase/tests.py"
];
pythonImportsCheck = [
"titlecase"
];
meta = with lib; {
description = "Python library to capitalize strings as specified by the New York Times";
homepage = "https://github.com/ppannuto/python-titlecase";
description = "Python Port of John Gruber's titlecase.pl";
license = licenses.mit;
maintainers = with maintainers; [ ];
};