def test_pygame2_base_Rect_copy(self): # __doc__ (as of 2009-02-23) for pygame2.base.Rect.copy: # copy () -> Rect # # Creates a copy of the Rect. # # Returns a new Rect, that contains the same values as the # caller. r = Rect( 1, 2, 3, 4 ) cp = r.copy () self.assertTrue (r == cp, "r (1, 2, 3, 4) is not equal to its copy") r = Rect( -10, 50, 10, 40 ) cp = r.copy () self.assertTrue (r == cp, "r (-10, 50, 10, 40) is not equal to its copy") r = Rect( 2, -5, 10, 40 ) cp = r.copy () self.assertTrue (r == cp, "r (2, -5, 10, 40) is not equal to its copy") r = Rect( -2, -5, 10, 40 ) cp = r.copy () self.assertTrue (r == cp, "r (-2, -5, 10, 40) is not equal to its copy")