def test_Event(self):
# __doc__ (as of 2008-08-02) for pygame.event.Event:
# pygame.event.Event(type, dict): return Event
# pygame.event.Event(type, **attributes): return Event
# create a new event object
#
# Creates a new event with the given type. The event is created with
# the given attributes and values. The attributes can come from a
# dictionary argument, or as string keys from a dictionary.
#
# The given attributes will be readonly attributes on the new event
# object itself. These are the only attributes on the Event object,
# there are no methods attached to Event objects.
e = pygame.event.Event(pygame.USEREVENT, some_attr=1, other_attr='1')
self.assertEquals(e.some_attr, 1)
self.assertEquals(e.other_attr, "1")
评论列表
文章目录