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 , pyyaml 10 , unicodecsv 11 , cmd2 12 }: 13 14 buildPythonPackage rec { ··· 31 unicodecsv 32 ]; 33 34 - # test dependencies are complex 35 - # and would require about 20 packages 36 - # to be added 37 - doCheck = false; 38 39 meta = with lib; { 40 description = "Command Line Interface Formulation Framework";
··· 9 , pyyaml 10 , unicodecsv 11 , cmd2 12 + , pytest 13 + , mock 14 + , testtools 15 + , fixtures 16 }: 17 18 buildPythonPackage rec { ··· 35 unicodecsv 36 ]; 37 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 + ''; 49 50 meta = with lib; { 51 description = "Command Line Interface Formulation Framework";