#NEWLINE# @ run_in_both ( Order1 , "['p', 'b', 'w', 'm']" ) #NEWLINE# def test_event_order2( Order1 ) : #NEWLINE# #INDENT# if this_is_js ( ) : #NEWLINE# #INDENT# pending_funcs = [ ] #NEWLINE# def setTimeout( func ) : #NEWLINE# #INDENT# pending_funcs . append ( func ) #NEWLINE# #UNINDENT# root . setTimeout = setTimeout #NEWLINE# #UNINDENT# m = Order1 ( ) #NEWLINE# m . emit ( 'foo' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# if this_is_js ( ) : #NEWLINE# #INDENT# for func in pending_funcs : #NEWLINE# #INDENT# func ( ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# event . loop . iter ( ) #NEWLINE# #UNINDENT# return m . r