Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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