def test_delayedCallStopsReactor(self):
        """
        The reactor can be stopped by a delayed call.
        """
        reactor = self.buildReactor()
        reactor.callLater(0, reactor.stop)
        reactor.run()

        The reactor can be stopped by a delayed call.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_time.py