Spaces:
Sleeping
Sleeping
File size: 393 Bytes
6085b61 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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)
|