#NEWLINE# def test_fork_spawns_anew( self ) : #NEWLINE# #INDENT# url = urlparse ( self . url ) #NEWLINE# transport = DummyThreadedScheme ( url ) #NEWLINE# transport . send_delay = 0.5 #NEWLINE# data = self . client . build_msg ( 'raven.events.Message' , message = 'foo' ) #NEWLINE# pid = os . fork ( ) #NEWLINE# if ( pid == 0 ) : #NEWLINE# #INDENT# time . sleep ( 0.1 ) #NEWLINE# transport . async_send ( data , None , None , None ) #NEWLINE# transport . get_worker ( ) . main_thread_terminated ( ) #NEWLINE# self . assertEqual ( len ( transport . events ) , 1 ) #NEWLINE# os . _exit ( 0 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# os . waitpid ( pid , 0 )