about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorOTABI Tomoya <tomoya.otabi@gmail.com>2024-03-23 20:49:30 +0900
committerGitHub <noreply@github.com>2024-03-23 20:49:30 +0900
commit560a21374575fcdd201155119617564ee3163772 (patch)
treec157248fc336d4a5889d0c305b28283af4c0761e /pkgs
parent7632618f7f248c5f10b8a7e57e48305209e0a472 (diff)
parentd244ab663dae17119489561b7c933cd36a04971e (diff)
downloadnixlib-560a21374575fcdd201155119617564ee3163772.tar
nixlib-560a21374575fcdd201155119617564ee3163772.tar.gz
nixlib-560a21374575fcdd201155119617564ee3163772.tar.bz2
nixlib-560a21374575fcdd201155119617564ee3163772.tar.lz
nixlib-560a21374575fcdd201155119617564ee3163772.tar.xz
nixlib-560a21374575fcdd201155119617564ee3163772.tar.zst
nixlib-560a21374575fcdd201155119617564ee3163772.zip
Merge pull request #297794 from ViZiD/editdistpy-add-tests
python312Packages.editdistpy: add tests
Diffstat (limited to 'pkgs')
-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"
   ];