#NEWLINE# @ skip_if_not_wx #NEWLINE# def test_destroy_after_ok_wx( ) : #NEWLINE# #INDENT# import wx #NEWLINE# foo = FooDialog ( ) #NEWLINE# ui = foo . edit_traits ( ) #NEWLINE# ui_children = [ ] #NEWLINE# for c in ui . control . GetChildren ( ) : #NEWLINE# #INDENT# ui_children . append ( c ) #NEWLINE# #UNINDENT# okbutton = ui . control . FindWindowByName ( 'button' ) #NEWLINE# click_event = wx . CommandEvent ( wx . wxEVT_COMMAND_BUTTON_CLICKED , okbutton . GetId ( ) ) #NEWLINE# okbutton . ProcessEvent ( click_event ) #NEWLINE# nose . tools . assert_is_none ( ui . control ) #NEWLINE# for c in c : #NEWLINE# #INDENT# with nose . tools . assert_raises ( wx . _core . PyDeadObjectError ) : #NEWLINE# #INDENT# c . GetName ( )