Unverified Commit d244ab66 authored by Radik Islamov's avatar Radik Islamov
Browse files

python312Packages.editdistpy: add tests

parent 34cfa58e
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -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"
  ];