mathpulse-api-v3test / tests /test_pdf_parser.py
github-actions[bot]
🚀 Auto-deploy backend from GitHub (9923591)
c1d887c
raw
history blame contribute delete
473 Bytes
import pytest
from backend.rag.pdf_parser import parse_pdf_layout
import os
# We'll use a simple mock/test check if possible, or just verify the structure
def test_parse_pdf_layout_structure():
# Since creating a real PDF in-memory is hard without extra libs,
# we'll just check if the function handles empty/invalid bytes gracefully
# or expect a specific error if lib fails on junk.
with pytest.raises(Exception):
parse_pdf_layout(b"not a pdf")