-
Notifications
You must be signed in to change notification settings - Fork 16
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
Showing
2 changed files
with
16 additions
and
1 deletion.
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
15 changes: 15 additions & 0 deletions
15
libs/ragstack-ai-llamaindex/tests/test_ragstack_llamaindex.py
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 |
---|---|---|
@@ -1,5 +1,20 @@ | ||
import pytest | ||
|
||
|
||
def test_import(): | ||
from ragstack_ai_llamaindex import __version__ # noqa | ||
from llama_index.vector_stores import AstraDBVectorStore, CassandraVectorStore # noqa | ||
import astrapy # noqa | ||
import cassio # noqa | ||
|
||
|
||
def test_dont_download(): | ||
# TODO: if you don't have the llama_index package installed, this test will fail because the monkey patch is not | ||
# executed | ||
from ragstack_ai_llamaindex import __version__ | ||
from llama_index import download_loader | ||
try: | ||
download_loader("PDFReader") | ||
pytest.fail("Should have raised an ImportError") | ||
except ImportError as error: | ||
assert "LlamaHub is disabled while using RAGStack AI" in str(error) |