def test_innit(self): pygame.init() # This is just to make sure it'll actually load up s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False) s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=True)
def test_handle_mousedragup(self): s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False) event = pygame.event.Event(MOUSEBUTTONUP, button=1, pos=(100,100)) s._handle_mousedragup(event)
def test_handle_doubleclick(self): s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False) first_click = pygame.event.Event(MOUSEBUTTONUP, button=1, pos=(80,80)) second_click = pygame.event.Event(MOUSEBUTTONUP, button=1, pos=(100,100)) s._handle_doubleclick(first_click, second_click)
def test_handle_mousedrag(self): s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False) event = pygame.event.Event(MOUSEMOTION, pos=(100,100)) s._handle_mousedrag(event)
def test_handle_keyup(self): s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False) event = pygame.event.Event(KEYUP, key=113) s._handle_keyup(event)
def test_handle_keyhold(self): s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False) s._handle_keyhold()
def test_handle_active(self): s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False) s._handle_active(pygame.event.Event(ACTIVEEVENT))
def test_redraw(self): s = screen.Screen(engine=core.temp_engine(), dimensions=[800, 600], fullscreen=False) s.engine.display = pygame.Surface((1,1))# Fake a surface to draw on s.redraw()