mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-17 21:26:26 +00:00
add test
This commit is contained in:
parent
60cd6a455a
commit
09aa56b63d
16
tests/test_vector_store.py
Normal file
16
tests/test_vector_store.py
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user