Spaces:
Running
Running
File size: 433 Bytes
e907a44 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | from app.utils.file_processor import FileProcessor
def test_extract_pdf_pages_uses_legacy_text_fallback_for_flat_rows():
pages = FileProcessor.extract_pdf_pages(
"Legacy extracted text with an em dash — and no PDF header.",
filename="legacy.pdf",
)
assert len(pages) == 1
assert pages[0]["text"].startswith("Legacy extracted text")
assert pages[0]["metadata"]["source_type"] == "legacy_text"
|