From 0ea18314f2b6a267b7c1363394d0621be171836a Mon Sep 17 00:00:00 2001 From: imClumsyPanda Date: Tue, 5 Sep 2023 21:07:54 +0800 Subject: [PATCH] fix unit test name --- tests/document_loader/test_imgloader.py | 10 +++++----- tests/document_loader/test_pdfloader.py | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/document_loader/test_imgloader.py b/tests/document_loader/test_imgloader.py index 8bba7da..92460cb 100644 --- a/tests/document_loader/test_imgloader.py +++ b/tests/document_loader/test_imgloader.py @@ -6,14 +6,14 @@ sys.path.append(str(root_path)) from pprint import pprint test_files = { - "ocr_test.pdf": str(root_path / "tests" / "samples" / "ocr_test.pdf"), + "ocr_test.jpg": str(root_path / "tests" / "samples" / "ocr_test.jpg"), } -def test_rapidocrpdfloader(): - pdf_path = test_files["ocr_test.pdf"] - from document_loaders import RapidOCRPDFLoader +def test_rapidocrloader(): + img_path = test_files["ocr_test.jpg"] + from document_loaders import RapidOCRLoader - loader = RapidOCRPDFLoader(pdf_path) + loader = RapidOCRLoader(img_path) docs = loader.load() pprint(docs) assert isinstance(docs, list) and len(docs) > 0 and isinstance(docs[0].page_content, str) diff --git a/tests/document_loader/test_pdfloader.py b/tests/document_loader/test_pdfloader.py index 92460cb..8bba7da 100644 --- a/tests/document_loader/test_pdfloader.py +++ b/tests/document_loader/test_pdfloader.py @@ -6,14 +6,14 @@ sys.path.append(str(root_path)) from pprint import pprint test_files = { - "ocr_test.jpg": str(root_path / "tests" / "samples" / "ocr_test.jpg"), + "ocr_test.pdf": str(root_path / "tests" / "samples" / "ocr_test.pdf"), } -def test_rapidocrloader(): - img_path = test_files["ocr_test.jpg"] - from document_loaders import RapidOCRLoader +def test_rapidocrpdfloader(): + pdf_path = test_files["ocr_test.pdf"] + from document_loaders import RapidOCRPDFLoader - loader = RapidOCRLoader(img_path) + loader = RapidOCRPDFLoader(pdf_path) docs = loader.load() pprint(docs) assert isinstance(docs, list) and len(docs) > 0 and isinstance(docs[0].page_content, str)