Merge pull request #297794 from ViZiD/editdistpy-add-tests

python312Packages.editdistpy: add tests
This commit is contained in:
OTABI Tomoya 2024-03-23 20:49:30 +09:00 committed by GitHub
commit 560a213745
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"
];