summary refs log tree commit diff
path: root/pkgs/development/python-modules/cliff/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/cliff/default.nix')
-rw-r--r--pkgs/development/python-modules/cliff/default.nix19
1 files changed, 15 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/cliff/default.nix b/pkgs/development/python-modules/cliff/default.nix
index d8ecd2553e8..7882c98e524 100644
--- a/pkgs/development/python-modules/cliff/default.nix
+++ b/pkgs/development/python-modules/cliff/default.nix
@@ -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";