-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
asoderlind
committed
Oct 15, 2023
1 parent
60cd6a4
commit 09aa56b
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
from flask import Flask | ||
from application.error import bad_request, response_error | ||
from application.vectorstore.faiss import FaissStore | ||
from application.core.settings import settings | ||
|
||
def test_init_local_faiss_store_huggingface(): | ||
""" | ||
Test that asserts that trying to initialize a FaissStore with | ||
the huggingface sentence transformer below together with the | ||
index.faiss file in the application/ folder results in a | ||
dimension mismatch error. | ||
""" | ||
settings.EMBEDDINGS_NAME = "huggingface_sentence-transformers/all-mpnet-base-v2" | ||
with pytest.raises(ValueError): | ||
FaissStore("application/", "", None) |