def test_get_rect_mid_frame_first_time_with_spacing_and_border(self): [left, bottom, width, height] = displayable.get_rect((3, 3), 1, 0, border=0.025, spacing=0.025) self.assert_close(left, 0.025) self.assert_close(bottom, 0.35) self.assert_close(width, 0.3) self.assert_close(height, 0.3)
def test_get_rect_mid_frame_first_time_with_spacing(self): [left, bottom, width, height] = displayable.get_rect((3, 3), 1, 0, border=0, spacing=0.05) assert_that(left, equal_to(0)) assert_that(bottom, equal_to(0.35)) assert_that(width, equal_to(0.3)) assert_that(height, equal_to(0.3))
def test_get_rect_last_frame_first_time_bottom_left(self): [left, bottom, width, height] = displayable.get_rect((3, 3), 2, 0, border=0, spacing=0) assert_that(left, equal_to(0)) assert_that(bottom, equal_to(0)) assert_that(width, equal_to(1. / 3)) assert_that(height, equal_to(1. / 3))
def test_get_rect_mid_frame_first_time_with_spacing_and_border(self): [left, bottom, width, height] = displayable.get_rect((3, 3), 1, 0, border=0.025, spacing=0.025) self.assert_close(left, 0.025) self.assert_close(bottom, 0.35) self.assert_close(width, 0.3) self.assert_close(height, 0.3)
def test_get_rect_mid_frame_first_time_with_spacing(self): [left, bottom, width, height] = displayable.get_rect((3, 3), 1, 0, border=0, spacing=0.05) assert_that(left, equal_to(0)) assert_that(bottom, equal_to(0.35)) assert_that(width, equal_to(0.3)) assert_that(height, equal_to(0.3))
def test_get_rect_last_frame_first_time_bottom_left(self): [left, bottom, width, height] = displayable.get_rect((3, 3), 2, 0, border=0, spacing=0) assert_that(left, equal_to(0)) assert_that(bottom, equal_to(0)) assert_that(width, equal_to(1.0 / 3)) assert_that(height, equal_to(1.0 / 3))