Пример #1
0
	def test_scale_with_center_set_to_false_returns_a_rectangle_with_its_width_and_height_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(3, center=False),
			Rectangle(Point(2, 3), Size(9, 12)),
			)
Пример #2
0
	def test_scale_returns_a_rectangle_with_its_width_and_height_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(3),
			Rectangle(Point(2-(9-3)/2, 3-(12-4)/2), Size(9, 12)),
			)