Skip to content

Commit

Permalink
Fix tests that bypassed errors when filtering keypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
JSabadin committed Oct 4, 2024
1 parent 6aefd05 commit 8198eef
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_augmentations/test_mosaic.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_bbox_mosaic4():
mosaic_bbox = bbox_mosaic4(
bbox, HEIGHT // 2, WIDTH // 2, i, HEIGHT, WIDTH, 0, 0
)
assert pytest.approx(mosaic_bbox, abs=0.5) == (
assert pytest.approx(mosaic_bbox, abs=1) == (
0,
0,
WIDTH // 2,
Expand All @@ -35,7 +35,6 @@ def test_bbox_mosaic4():


def test_keypoint_mosaic4():
keypoint = (WIDTH // 2, HEIGHT // 2, 0, 0)
for i, (w, h) in enumerate(
[
(WIDTH // 2, HEIGHT // 2),
Expand All @@ -45,9 +44,9 @@ def test_keypoint_mosaic4():
]
):
mosaic_keypoint = keypoint_mosaic4(
keypoint, HEIGHT // 2, WIDTH // 2, i, HEIGHT, WIDTH, 0, 0
(w, h, 0, 0), HEIGHT // 2, WIDTH // 2, i, HEIGHT, WIDTH, 0, 0
)
assert pytest.approx(mosaic_keypoint, abs=0.25) == (w, h, 0, 0)
assert pytest.approx(mosaic_keypoint, abs=0.25) == (w * 2, h * 2, 0, 0)


def test_Mosaic4():
Expand Down

0 comments on commit 8198eef

Please sign in to comment.