def test_post__and_poll(self):
# __doc__ (as of 2008-06-25) for pygame.event.post:
# pygame.event.post(Event): return None
# place a new event on the queue
e1 = pygame.event.Event(pygame.USEREVENT, attr1='attr1')
pygame.event.post(e1)
posted_event = pygame.event.poll()
self.assertEquals (
e1.attr1, posted_event.attr1, race_condition_notification
)
# fuzzing event types
for i in range(1, 11):
pygame.event.post(pygame.event.Event(i))
self.assertEquals (
pygame.event.poll().type, i, race_condition_notification
)
评论列表
文章目录