from pathlib import Path

from pdf_to_md_local.analyzer import analyze_pdf

SAMPLE = Path(r"C:\Users\hiiam\OneDrive\Desktop\Sở Nông nghiệp và MT.pdf")


def test_sample_pdf_is_classified_as_ocr_route():
    analysis = analyze_pdf(SAMPLE)

    assert analysis.page_count == 8
    assert analysis.has_text_layer is False
    assert analysis.recommended_route == "local_ocr"
    assert "scan_pdf_requires_ocr" in analysis.warnings

