about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/science/math/faiss/tests.nix
blob: fcf57a8bc9fd2cc28da357879e646dda96962369 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ lib
, buildPythonPackage
, faiss
, scipy
, pytestCheckHook
}:

assert faiss.pythonSupport;

buildPythonPackage {
  pname = "faiss-pytest-suite";
  inherit (faiss) version;

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

  checkInputs = [
    faiss
    pytestCheckHook
    scipy
  ] ++
  faiss.extra-requires.all;
}