def test_reactor(self):
        """
        Importing L{twisted.internet.reactor} installs the default reactor if
        none is installed.
        """
        installed = []
        def installer():
            installed.append(True)
            return install()
        self.patch(default, "install", installer)

        with NoReactor():
            from twisted.internet import reactor
            self.assertTrue(IReactorCore.providedBy(reactor))
            self.assertEqual(installed, [True])

        Importing L{twisted.internet.reactor} installs the default reactor if
        none is installed.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_default.py