'L{LockWorker.quit} frees the resources associated with its lock and
causes further calls to C{do} and C{quit} to fail.'

def test_quit(self):

    lock = FakeLock()
    ref = weakref.ref(lock)
    worker = LockWorker(lock, local())
    lock = None
    self.assertIsNot(ref(), None)
    worker.quit()
    gc.collect()
    self.assertIs(ref(), None)
    self.assertRaises(AlreadyQuit, worker.quit)
    self.assertRaises(AlreadyQuit, worker.do, list)
