Skip to content

Commit 1611a61

Browse files
committed
Fix unittests
1 parent a61aa85 commit 1611a61

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test_unstructured/partition/pdf_image/test_ocr.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def test_supplement_page_layout_with_ocr_invalid_ocr(monkeypatch):
7272

7373
def test_get_ocr_layout_from_image_tesseract(monkeypatch):
7474
monkeypatch.setattr(
75-
unstructured_pytesseract,
76-
"image_to_data",
75+
OCRAgentTesseract,
76+
"image_to_data_with_character_confidence_filter",
7777
lambda *args, **kwargs: pd.DataFrame(
7878
{
7979
"left": [10, 20, 30, 0],
@@ -446,8 +446,8 @@ def test_auto_zoom_not_exceed_tesseract_limit(monkeypatch):
446446
monkeypatch.setenv("TESSERACT_MIN_TEXT_HEIGHT", "1000")
447447
monkeypatch.setenv("TESSERACT_OPTIMUM_TEXT_HEIGHT", "100000")
448448
monkeypatch.setattr(
449-
unstructured_pytesseract,
450-
"image_to_data",
449+
OCRAgentTesseract,
450+
"image_to_data_with_character_confidence_filter",
451451
lambda *args, **kwargs: pd.DataFrame(
452452
{
453453
"left": [10, 20, 30, 0],

0 commit comments

Comments
 (0)