def test_dimensions(self): first = Field(0, 0) second = Field(9, 9) rect = Rectangle(first, second) self.assertEqual(rect.height(), 10) self.assertEqual(rect.width(), 10)
def assert_rectangle_shape(img_np, rectangle: Rectangle, message: str): img_shape = img_np.shape assert img_shape[0] == rectangle.height(), message assert img_shape[1] == rectangle.width(), message