Skip to content

Commit

Permalink
Skip faiss tests on Windows to avoid running CI for 360 minutes (#7014)
Browse files Browse the repository at this point in the history
* Refactor require_faiss

* Skip faiss tests on Windows
  • Loading branch information
albertvillanova authored Jul 1, 2024
1 parent 054e57a commit 9af8dd3
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,7 @@ def parse_flag_from_env(key, default=False):
)


def require_faiss(test_case):
"""
Decorator marking a test that requires Faiss.
These tests are skipped when Faiss isn't installed.
"""
try:
import faiss # noqa
except ImportError:
test_case = unittest.skip("test requires faiss")(test_case)
return test_case
require_faiss = pytest.mark.skipif(find_spec("faiss") is None or sys.platform == "win32", reason="test requires faiss")


def require_regex(test_case):
Expand Down

0 comments on commit 9af8dd3

Please sign in to comment.