Spaces:
Sleeping
Sleeping
Download docstream/tests/test_extractor.py from DevilBits/auto-swe-agent-ui: direct link, hf CLI and curl.
- Browser
- Download file 393 Bytes
-
https://huggingface.co/spaces/DevilBits/auto-swe-agent-ui/resolve/main/docstream/tests/test_extractor.py
- Command line
-
hf download hf://spaces/DevilBits/auto-swe-agent-ui/docstream/tests/test_extractor.py
-
curl -L -o test_extractor.py https://huggingface.co/spaces/DevilBits/auto-swe-agent-ui/resolve/main/docstream/tests/test_extractor.py
393 Bytes
| import pytest | |
| from docstream.core.extractor import PDFExtractor | |
| pytest.mark.parametrize( | |
| "password, expected_error", | |
| [ | |
| (None, "PDF is password protected. Pass password= to extract()"), | |
| ], | |
| ) | |
| def test_password_protected_pdf(password, expected_error): | |
| with pytest.raises(ExtractionError, match=expected_error): | |
| PDFExtractor("protected.pdf", password=password) | |