Files
wehub-resource-sync da6a09ff09
Auto Bump and Release / auto-bump-and-release (push) Has been cancelled
style-check / pre-commit (push) Has been cancelled
unit-test / unit testing with python (push) Has been cancelled
unit-test / unit testing with python 3.10 (push) Has been cancelled
unit-test / unit testing with python 3.11 (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:39:49 +08:00

22 lines
580 B
Python

# TODO: This test is broken and should be rewritten
from pathlib import Path
from kotaemon.loaders import AdobeReader
# from dotenv import load_dotenv
input_file = Path(__file__).parent / "resources" / "multimodal.pdf"
# load_dotenv()
def test_adobe_reader():
reader = AdobeReader()
documents = reader.load_data(input_file)
table_docs = [doc for doc in documents if doc.metadata.get("type", "") == "table"]
assert len(table_docs) == 2
figure_docs = [doc for doc in documents if doc.metadata.get("type", "") == "image"]
assert len(figure_docs) == 2