File size: 473 Bytes
c1d887c
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
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")