def test_alreadyInstalled(self):
        """
        If a reactor is already installed, L{installReactor} raises
        L{ReactorAlreadyInstalledError}.
        """
        with NoReactor():
            installReactor(object())
            self.assertRaises(ReactorAlreadyInstalledError, installReactor,
                              object())

        If a reactor is already installed, L{installReactor} raises
        L{ReactorAlreadyInstalledError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_main.py