def test_change_center(self): """C-9. Verify center attribute change works.""" expected = ((3, 4), 3) circle = Circle(Point(1, 2), 3) point1 = Point(3, 4) circle.center = point1 self.assertEqual(circle_data(circle), expected)
def test_error_center_change_to_not_point(self): """C-11. Verify error if changing center to something not a Point.""" circle = Circle(center=Point(3, 4), radius=2) with self.assertRaises(TypeError): circle.center = (3, 4)
def test_center_change(self): """C-9. Verify center attribute change works.""" circle = Circle() circle.center = Point(1, 2) expected = (1, 2) self.assertEqual(point_data(circle.center), expected)
def test_illegal_center_modification(self): """C-11. Verify error if changing center to something not a Point.""" circle = Circle() with self.assertRaises(TypeError): circle.center = 0
def test_change_center(self): """C-9. Verify center attribute change works.""" expected = ((2, 3), 1) circle = Circle() circle.center = Point(2, 3) self.assertEqual(circle_data(circle), expected)