python3Packages.cliff: fix build and add tests

authored by Jonathan Ringer and committed by Jon 60e1709b 8aa5f30a

+15 -4
+15 -4
pkgs/development/python-modules/cliff/default.nix
··· 9 9 , pyyaml 10 10 , unicodecsv 11 11 , cmd2 12 + , pytest 13 + , mock 14 + , testtools 15 + , fixtures 12 16 }: 13 17 14 18 buildPythonPackage rec { ··· 31 35 unicodecsv 32 36 ]; 33 37 34 - # test dependencies are complex 35 - # and would require about 20 packages 36 - # to be added 37 - doCheck = false; 38 + # remove version constraints 39 + postPatch = '' 40 + sed -i '/cmd2/c\cmd2' requirements.txt 41 + ''; 42 + 43 + checkInputs = [ fixtures mock pytest testtools ]; 44 + # add some tests 45 + checkPhase = '' 46 + pytest cliff/tests/test_{utils,app,command,help,lister}.py \ 47 + -k 'not interactive_mode' 48 + ''; 38 49 39 50 meta = with lib; { 40 51 description = "Command Line Interface Formulation Framework";