Exemplo n.º 1
0
    def test_pygame2_base_Rect_centery(self):

        # __doc__ (as of 2008-10-17) for pygame2.base.Rect.centery:

        # Gets or sets the vertical center position of the Rect.
        r = Rect( 1, 2, 3, 4 )
        new_centery = r.centery + 20
        expected_top = r.top + 20
        old_height = r.height
        
        r.centery = new_centery
        self.assertEqual( new_centery, r.centery )
        self.assertEqual( expected_top, r.top )
        self.assertEqual( old_height, r.height )