Skip to content

Commit

Permalink
refactor: revert embedded_text_region unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
christinestraub committed May 20, 2024
1 parent 5e48003 commit 3d3b024
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test_unstructured_inference/inference/test_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,12 @@ def check_annotated_image():
check_annotated_image()


@pytest.mark.parametrize(("text", "expected"), [("asdf", "asdf"), (None, "")])
def test_embedded_text_region(text, expected):
etr = elements.EmbeddedTextRegion.from_coords(0, 0, 24, 24, text=text)
assert etr.extract_text(objects=None) == expected


class MockDetectionModel(layout.UnstructuredObjectDetectionModel):
def initialize(self, *args, **kwargs):
pass
Expand Down

0 comments on commit 3d3b024

Please sign in to comment.