Skip to content

Commit

Permalink
Add: unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
zMardone committed Mar 22, 2024
1 parent b14f2de commit 9cc429b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/tests/test_document_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,17 @@ def test_load_file_url_and_split_text(self):
docs = load_file_url_and_split_text(file_path, file_type, self.text_splitter)
self.assertEqual(list, type(docs))

def test_load_file_url_and_split_text_pdf_miner(self):
file_path = f'{self.path}/{self.file_name}.pdf'
file_type = "pdf"
docs = load_file_url_and_split_text(
file_path,
file_type,
self.text_splitter,
load_type="pdfminer"
)
self.assertEqual(list, type(docs))

def test_load_file_url_and_get_pages_text(self): # this function is deprecated
file_path = f'{self.path}/{self.file_name}.pdf'
file_type = "pdf"
Expand Down

0 comments on commit 9cc429b

Please sign in to comment.