python3Packages.cliff: fix build and add tests

This commit is contained in:
Jonathan Ringer 2019-11-06 16:51:27 -08:00 committed by Jon
parent 8aa5f30a8f
commit 60e1709bae

View file

@ -9,6 +9,10 @@
, pyyaml
, unicodecsv
, cmd2
, pytest
, mock
, testtools
, fixtures
}:
buildPythonPackage rec {
@ -31,10 +35,17 @@ buildPythonPackage rec {
unicodecsv
];
# test dependencies are complex
# and would require about 20 packages
# to be added
doCheck = false;
# remove version constraints
postPatch = ''
sed -i '/cmd2/c\cmd2' requirements.txt
'';
checkInputs = [ fixtures mock pytest testtools ];
# add some tests
checkPhase = ''
pytest cliff/tests/test_{utils,app,command,help,lister}.py \
-k 'not interactive_mode'
'';
meta = with lib; {
description = "Command Line Interface Formulation Framework";