Skip to content

Commit

Permalink
test: update test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
christinestraub committed Oct 3, 2023
1 parent 662b89b commit a77f4bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test_unstructured/partition/utils/test_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ def test_coordinates_to_bbox():


def test_shrink_bbox():
bbox = (0, 0, 100, 100)
shrink_factor = 0.5
expected_result = (25, 25, 75, 75)
bbox = (0, 0, 200, 100)
shrink_factor = 0.9
expected_result = (0, 0, 180, 90)
assert shrink_bbox(bbox, shrink_factor) == expected_result

bbox = (0, 0, 200, 100)
bbox = (20, 20, 320, 120)
shrink_factor = 0.9
expected_result = (10, 5, 190, 95)
expected_result = (20, 20, 290, 110)
assert shrink_bbox(bbox, shrink_factor) == expected_result

0 comments on commit a77f4bd

Please sign in to comment.