about summary refs log tree commit diff
path: root/pkgs/development/python-modules/editdistpy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/editdistpy/default.nix')
-rw-r--r--pkgs/development/python-modules/editdistpy/default.nix26
1 files changed, 25 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/editdistpy/default.nix b/pkgs/development/python-modules/editdistpy/default.nix
index 5c86f3773bff..a785e1b05b67 100644
--- a/pkgs/development/python-modules/editdistpy/default.nix
+++ b/pkgs/development/python-modules/editdistpy/default.nix
@@ -2,10 +2,16 @@
 , buildPythonPackage
 , fetchFromGitHub
 
+, pytestCheckHook
+
 , pythonOlder
 
 , setuptools
 , cython_3
+
+, symspellpy
+, numpy
+, editdistpy
 }:
 
 buildPythonPackage rec {
@@ -27,9 +33,27 @@ buildPythonPackage rec {
     cython_3
   ];
 
-  # for tests need symspellpy package, symspellpy is not in nixpkgs...
+  # error: infinite recursion encountered
   doCheck = false;
 
+  nativeCheckInputs = [
+    pytestCheckHook
+    symspellpy
+    numpy
+  ];
+
+  preCheck = ''
+    rm -r editdistpy
+  '';
+
+  passthru.tests = {
+    check = editdistpy.overridePythonAttrs (
+      _: {
+        doCheck = true;
+      }
+    );
+  };
+
   pythonImportsCheck = [
     "editdistpy"
   ];