Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

812 B
Raw Blame
"""The release corpus must be real, extractable PDFs with known contents."""

from local_deep_research.document_loaders.bounded_pdf import load_bounded_pdf
from tests.fixtures.synthetic_pdf import synthetic_pdf


def test_repeated_text_pdf_roundtrips_every_page_marker():
    pdf = synthetic_pdf(7, pages=3, lines=5, words=4)
    assert pdf.startswith(b"%PDF-")
    documents = load_bounded_pdf(pdf, "synthetic.pdf")
    assert len(documents) == 3
    for page, document in enumerate(documents):
        for line in range(5):
            assert (
                f"synthetic-document-000007-page-{page:04d}-line-{line:03d}"
                in document.page_content
            )
        assert document.page_content.count("vector research alpha beta") == 20
        assert not document.metadata.get("truncated")