fix unit test name
This commit is contained in:
parent
082f429809
commit
0ea18314f2
|
|
@ -6,14 +6,14 @@ sys.path.append(str(root_path))
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
test_files = {
|
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():
|
def test_rapidocrloader():
|
||||||
pdf_path = test_files["ocr_test.pdf"]
|
img_path = test_files["ocr_test.jpg"]
|
||||||
from document_loaders import RapidOCRPDFLoader
|
from document_loaders import RapidOCRLoader
|
||||||
|
|
||||||
loader = RapidOCRPDFLoader(pdf_path)
|
loader = RapidOCRLoader(img_path)
|
||||||
docs = loader.load()
|
docs = loader.load()
|
||||||
pprint(docs)
|
pprint(docs)
|
||||||
assert isinstance(docs, list) and len(docs) > 0 and isinstance(docs[0].page_content, str)
|
assert isinstance(docs, list) and len(docs) > 0 and isinstance(docs[0].page_content, str)
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,14 @@ sys.path.append(str(root_path))
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
test_files = {
|
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():
|
def test_rapidocrpdfloader():
|
||||||
img_path = test_files["ocr_test.jpg"]
|
pdf_path = test_files["ocr_test.pdf"]
|
||||||
from document_loaders import RapidOCRLoader
|
from document_loaders import RapidOCRPDFLoader
|
||||||
|
|
||||||
loader = RapidOCRLoader(img_path)
|
loader = RapidOCRPDFLoader(pdf_path)
|
||||||
docs = loader.load()
|
docs = loader.load()
|
||||||
pprint(docs)
|
pprint(docs)
|
||||||
assert isinstance(docs, list) and len(docs) > 0 and isinstance(docs[0].page_content, str)
|
assert isinstance(docs, list) and len(docs) > 0 and isinstance(docs[0].page_content, str)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue