Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iammosespaulr committed Dec 12, 2024
1 parent 8c3d11c commit 542dc74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/builders/test_rotated_bboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ def test_rotated_bboxes(pdf_document):
# Ensure we match all text lines up properly
text_lines = first_page.contained_blocks(pdf_document, (BlockTypes.Line,))
text_blocks = first_page.contained_blocks(pdf_document, (BlockTypes.Text,))
assert len(text_lines) == 95
assert len(text_lines) == 86

# Ensure the bbox sizes match up
max_line_position = max([line.polygon.x_end for line in text_lines])
max_block_position = max([block.polygon.x_end for block in text_blocks if block.source == "layout"])
assert max_line_position <= max_block_position
assert max_line_position <= max_block_position
2 changes: 1 addition & 1 deletion tests/providers/test_pdf_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def test_pdf_provider(pdf_provider):
assert pdf_provider.get_images([0], 96)[0].size == (816, 1056)

page_lines = pdf_provider.get_page_lines(0)
assert len(page_lines) == 93
assert len(page_lines) == 87

spans = page_lines[0].spans
assert len(spans) == 2
Expand Down

0 comments on commit 542dc74

Please sign in to comment.