#NEWLINE# def test_quitConcurrentWithWorkHappening( self ) : #NEWLINE# #INDENT# '\n        If work happens after L{Team.quit} sets its C{Quit} flag, but before\n        any other work takes place, the L{Team} should still exit gracefully.\n        ' #NEWLINE# self . team . do ( list ) #NEWLINE# originalSet = self . team . _quit . set #NEWLINE# def performWorkConcurrently( ) : #NEWLINE# #INDENT# originalSet ( ) #NEWLINE# self . performAllOutstandingWork ( ) #NEWLINE# #UNINDENT# self . team . _quit . set = self #NEWLINE# self . team . quit ( ) #NEWLINE# self . assertRaises ( AlreadyQuit , self . team . quit ) #NEWLINE# self . assertRaises ( AlreadyQuit , self . team . do , list )