def test_initial_fullscreen(self): self.w = window.Window(fullscreen=True) self.w.push_handlers(self) self.w.push_handlers(WindowEventLogger()) self.on_expose() while not self.w.has_exit: self.w.dispatch_events() self.w.close()
def test_set_fullscreen(self): self.w = w = window.Window(200, 200) w.push_handlers(self) w.push_handlers(WindowEventLogger()) self.on_expose() while not w.has_exit: w.dispatch_events() w.close()
def test_mouse_drag(self): w = Window(200, 200) try: w.push_handlers(WindowEventLogger()) while not w.has_exit: w.dispatch_events() finally: w.close() self.user_verify('Pass test?', take_screenshot=False)
def test_set_fullscreen(self): self.w = w = window.Window(200, 200) try: w.push_handlers(self) w.push_handlers(WindowEventLogger()) self.on_expose() while not w.has_exit: w.dispatch_events() finally: w.close() self.user_verify('Pass test?', take_screenshot=False)
def test_initial_fullscreen(self): self.w = window.Window(fullscreen=True) try: self.w.push_handlers(self) self.w.push_handlers(WindowEventLogger()) self.on_expose() while not self.w.has_exit: self.w.dispatch_events() finally: self.w.close() self.user_verify('Pass test?', take_screenshot=False)
def test_activate(self): w = window.Window(200, 200) w.push_handlers(WindowEventLogger()) last_time = time.time() while not w.has_exit: if time.time() - last_time > 5: w.activate() last_time = time.time() print 'Activated window.' w.dispatch_events() w.close()
def test_set_fullscreen(self): self.w = w = window.Window(200, 200) w.push_handlers(self) w.push_handlers(WindowEventLogger()) self.on_expose() try: while not w.has_exit: w.dispatch_events() w.close() except SystemExit: # Child process on linux calls sys.exit(0) when it's done. pass
def test_set_visible(self): w = window.Window(200, 200) w.push_handlers(WindowEventLogger()) last_time = time.time() visible = True while not w.has_exit: if time.time() - last_time > 5: visible = not visible w.set_visible(visible) last_time = time.time() print 'Set visibility to %r.' % visible w.dispatch_events() w.close()
def test_activate(self): w = window.Window(200, 200) try: w.push_handlers(WindowEventLogger()) last_time = time.time() while not w.has_exit: if time.time() - last_time > 5: w.activate() last_time = time.time() print('Activated window.') w.dispatch_events() finally: w.close() self.user_verify('Pass test?', take_screenshot=False)
def test_set_visible(self): w = Window(200, 200) try: w.push_handlers(WindowEventLogger()) w.dispatch_events() self.user_verify('Is the window visible?', take_screenshot=False) w.set_visible(False) w.dispatch_events() self.user_verify('Is the window no longer visible?', take_screenshot=False) w.set_visible(True) w.dispatch_events() self.user_verify('Is the window visible again?', take_screenshot=False) finally: w.close()
def test_mouse_drag(self): w = window.Window(200, 200) w.push_handlers(WindowEventLogger()) while not w.has_exit: w.dispatch_events() w.close()