def test_stopWhenAlreadyStopped(self):
        """
        C{reactor.stop()} raises L{RuntimeError} when called after the reactor
        has been stopped.
        """
        reactor = self.buildReactor()
        reactor.callWhenRunning(reactor.stop)
        self.runReactor(reactor)
        self.assertRaises(RuntimeError, reactor.stop)

        C{reactor.stop()} raises L{RuntimeError} when called after the reactor
        has been stopped.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_core.py