diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/science/math/faiss/tests.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/science/math/faiss/tests.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/science/math/faiss/tests.nix b/nixpkgs/pkgs/development/libraries/science/math/faiss/tests.nix new file mode 100644 index 000000000000..858a980bfeaf --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/science/math/faiss/tests.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, faiss +, scipy +, pytestCheckHook +}: + +assert faiss.pythonSupport; + +buildPythonPackage { + pname = "faiss-pytest-suite"; + inherit (faiss) version; + + format = "other"; + + src = "${faiss.src}/tests"; + + dontBuild = true; + dontInstall = true; + + # Tests that need GPUs and would fail in the sandbox + disabledTestPaths = lib.optionals faiss.cudaSupport [ + "test_contrib.py" + ]; + + disabledTests = [ + # https://github.com/facebookresearch/faiss/issues/2836 + "test_update_codebooks_with_double" + ]; + + nativeCheckInputs = [ + faiss + pytestCheckHook + scipy + ] ++ + faiss.extra-requires.all; +} |