Spaces:
Running
Running
Download tests/test_pdf_parser.py from Deign86/mathpulse-api-v3test: direct link, hf CLI and curl.
- Browser
- Download file 473 Bytes
-
https://huggingface.co/spaces/Deign86/mathpulse-api-v3test/resolve/main/tests/test_pdf_parser.py
- Command line
-
hf download hf://spaces/Deign86/mathpulse-api-v3test/tests/test_pdf_parser.py
-
curl -L -o test_pdf_parser.py https://huggingface.co/spaces/Deign86/mathpulse-api-v3test/resolve/main/tests/test_pdf_parser.py
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") | |