def test_resize_bbox_degenerate(self): box = 1, 2, 1, 2 image_size = 3, 3 resize_size = 3, 3 resized_box = resize_bbox(box, image_size, resize_size) self.assertEqual(resized_box, (1, 2, 1, 2))
def test_resize_bbox_case(self): box = 1, 2, 4, 3 image_size = 10, 20 resize_size = 35, 10 resized_box = resize_bbox(box, image_size, resize_size) self.assertEqual(resized_box, (3, 1, 14, 1))