#NEWLINE# def test_independent( self ) : #NEWLINE# #INDENT# 'Test that waiters are independent.' #NEWLINE# result = [ ] #NEWLINE# def bad( res ) : #NEWLINE# #INDENT# result . append ( res ) #NEWLINE# raise Exception ( ) #NEWLINE# #UNINDENT# def fired( res ) : #NEWLINE# #INDENT# result . append ( res ) #NEWLINE# #UNINDENT# e = TwistedEvent ( ) #NEWLINE# d = e . wait ( ) . addCallback ( bad ) #NEWLINE# e . wait ( ) . addCallback ( fired ) #NEWLINE# d . addErrback ( ( lambda _ : None ) ) #NEWLINE# e . fire ( ) #NEWLINE# self . assertEqual ( result , [ True , True ] )