def test_scale_x_with_center_set_to_false_returns_a_rectangle_with_its_width_multiplied_by_a_scale_factor_anchored_to_the_same_point_as_the_source_rectangle(self): # noqa r = Rectangle(Point(2, 3), Size(3, 4)) self.assertEqual( r.scale_x(3, center=False), Rectangle(Point(2, 3), Size(9, 4)), )
def test_scale_x_returns_a_rectangle_with_its_width_multiplied_by_a_scale_factor_centered_on_the_same_center_as_the_source_rectangle(self): # noqa r = Rectangle(Point(2, 3), Size(3, 4)) self.assertEqual( r.scale_x(3), Rectangle(Point(2-(9-3)/2, 3), Size(9, 4)), )