@requires_application()
def test_close_keys():
 c = Canvas(keys='interactive')
 x = list()
 @c.events.close.connect
 def closer(event):
  x.append('done')
 c.events.key_press(key=keys.ESCAPE, text='', modifiers=[])
 assert_equal(len(x), 1)
 c.app.process_events()

@ requires_application ( ) def test_close_keys ( ) : c = Canvas ( keys = 'interactive' ) x = list ( ) @ c . events . close . connect def closer ( event ) : x . append ( 'done' ) c . events . key_press ( key = keys . ESCAPE , text = '' , modifiers = [ ] ) assert_equal ( len ( x ) , 1 ) c . app . process_events ( )
test close keys .