def test_quitConcurrentWithWorkHappening(self):
        self.team.do(list)
        originalSet = self.team._quit.set
        def performWorkConcurrently():
            originalSet()
            self.performAllOutstandingWork()
        self.team._quit.set = performWorkConcurrently
        self.team.quit()
        self.assertRaises(AlreadyQuit, self.team.quit)
        self.assertRaises(AlreadyQuit, self.team.do, list)
If work happens after L{Team.quit} sets its C{Quit} flag, but before
dataset/ETHPy150Open twisted/twisted/twisted/_threads/test/test_team.py/TeamTests.test_quitConcurrentWithWorkHappening