We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ff15c5 commit 0e11958Copy full SHA for 0e11958
tests/utils.py
@@ -73,18 +73,7 @@ def parse_flag_from_env(key, default=False):
73
)
74
75
76
-def require_faiss(test_case):
77
- """
78
- Decorator marking a test that requires Faiss.
79
-
80
- These tests are skipped when Faiss isn't installed.
81
82
83
- try:
84
- import faiss # noqa
85
- except ImportError:
86
- test_case = unittest.skip("test requires faiss")(test_case)
87
- return test_case
+require_faiss = pytest.mark.skipif(find_spec("faiss") is None or sys.platform == "win32", reason="test requires faiss")
88
89
90
def require_regex(test_case):
0 commit comments