'When the reactor stops, L{ReactorBase._stopThreadPool} drops the
reactor\'s direct reference to its internal threadpool and removes
the associated startup and shutdown triggers.
This is the case of the thread pool being created before the reactor
is run.'

def test_stopThreadPool(self):

    reactor = self.buildReactor()
    threadpool = ref(reactor.getThreadPool())
    reactor.callWhenRunning(reactor.stop)
    self.runReactor(reactor)
    gc.collect()
    self.assertIsNone(threadpool())
