ϪfKbdZddlmZddlmZddlmZddlmZGddejZ y) z% Tests for L{twisted.internet.main}. )ReactorAlreadyInstalledError)installReactor) NoReactor)unittestc(eZdZdZddZddZddZy)InstallReactorTestsz& Tests for L{installReactor}. Nct5t}t|ddlm}|j ||dddy#1swYyxYw)zN L{installReactor} installs a new reactor if none is present. r)reactorN)robjectrtwisted.internetr assertIs)self newReactorr s A/usr/lib/python3/dist-packages/twisted/internet/test/test_main.pytest_installReactorz'InstallReactorTests.test_installReactors>[ /J : & 0 MM*g .  / / /s .AA ct5tt|jtttdddy#1swYyxYw)zv If a reactor is already installed, L{installReactor} raises L{ReactorAlreadyInstalledError}. N)rrr assertRaisesrrs rtest_alreadyInstalledz)InstallReactorTests.test_alreadyInstalledsA [ V 68 $   :NFH U V V Vs 7A  AcJ|jttty)zo For backwards compatibility, L{ReactorAlreadyInstalledError} is an L{AssertionError}. N) assertTrue issubclassrAssertionErrorrs rtest_errorIsAnAssertionErrorz0InstallReactorTests.test_errorIsAnAssertionError(s  #?PQ)returnN)__name__ __module__ __qualname____doc__rrrrrrrs /VRrrN) r twisted.internet.errorrtwisted.internet.mainr#twisted.internet.test.modulehelpersr twisted.trialrSynchronousTestCaserr!rrr's- @09"R(66Rr