File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
test_unstructured/partition/pdf_image Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 44import pytest
55from pdfminer .layout import LAParams
66from PIL import Image
7- from unstructured_inference .constants import Source as InferenceSource
7+ from unstructured_inference .constants import Source as InferenceSource , IsExtracted
88from unstructured_inference .inference .elements import (
99 EmbeddedTextRegion ,
1010 Rectangle ,
@@ -249,6 +249,11 @@ def test_process_file_with_pdfminer():
249249 assert links [0 ][0 ]["url" ] == "https://layout-parser.github.io"
250250
251251
252+ def test_process_file_with_pdfminer_is_extracted_array ():
253+ layout , _ = process_file_with_pdfminer (example_doc_path ("pdf/layout-parser-paper-fast.pdf" ))
254+ assert all (is_extracted is IsExtracted .TRUE for is_extracted in layout [0 ].is_extracted_array )
255+
256+
252257@patch ("unstructured.partition.pdf_image.pdfminer_utils.LAParams" , return_value = LAParams ())
253258def test_laprams_are_passed_from_partition_to_pdfminer (pdfminer_mock ):
254259 partition (
You can’t perform that action at this time.
0 commit comments