1 # Copyright (c) Twisted Matrix Laboratories.
2 # See LICENSE for details.
5 Tests for L{twisted.internet.main}.
8 from twisted.trial import unittest
9 from twisted.internet.error import ReactorAlreadyInstalledError
10 from twisted.internet.main import installReactor
13 class InstallReactorTests(unittest.TestCase):
15 Tests for L{installReactor}
18 def test_alreadyInstalled(self):
20 If a reactor is already installed, L{installReactor} raises
21 L{ReactorAlreadyInstalledError}.
23 # Because this test runs in trial, assume a reactor is already
25 self.assertRaises(ReactorAlreadyInstalledError, installReactor,
29 def test_errorIsAnAssertionError(self):
31 For backwards compatibility, L{ReactorAlreadyInstalledError} is an
34 self.assertTrue(issubclass(ReactorAlreadyInstalledError,