ϪfdZddlmZmZmZddlmZddlmZddl m Z ddl m Z ddl mZmZdd lmZd Zd ed efd ZGddeZy)zS Tests L{twisted.internet.test.reactormixins}, the reactor-testing support module. ) assert_thatequal_to has_length)NoReturn)matches_result) TestResult) TestLoader)SynchronousTestCase TestSuite)ReactorBuilderzThis reactor is unsupported.selfreturnc tt)z A function that can be used as a factory for L{ReactorBuilder} tests but which always raises an exception. This gives the appearance of a reactor type which is unsupported in the current runtime configuration for some reason. ) Exception UNSUPPORTEDrs J/usr/lib/python3/dist-packages/twisted/internet/test/test_reactormixins.pyunsupportedReactorrs K  ceZdZdZddZy)ReactorBuilderTestsz& Tests for L{ReactorBuilder}. NcnGddtt}|jj}t t fd|D}t }|j|t|ttd|j\\}}t|tty)z} If the reactor factory raises any exception then L{ReactorBuilder.buildReactor} raises L{SkipTest}. ceZdZdgZddZy)HReactorBuilderTests.test_buildReactorFails..BrokenReactorFactoryz;twisted.internet.test.test_reactormixins.unsupportedReactorNc$|jy)zQ Try, and fail, to build an unsupported reactor. N) buildReactorrs rtest_brokenFactoryz[ReactorBuilderTests.test_buildReactorFails..BrokenReactorFactory.test_brokenFactory/s!!#rrN)__name__ __module__ __qualname__ _reactorsrrrBrokenReactorFactoryr*sMI $rr%c3@K|]}j|yw)N) loadClass).0clsloaders r z=ReactorBuilderTests.test_buildReactorFails..7sAC&**3/Asr )skipsN)r r makeTestCaseClassesvaluesr r rrunrrrr,rr)rr%casessuiteresult_skipr*s @rtest_buildReactorFailsz*ReactorBuilderTests.test_buildReactorFails$s $>3F $%88:AACA5AA &FNA?@ll !TD(;/0rr)r r!r"__doc__r5r$rrrrs 1rrN)r6hamcrestrrrtypingr!twisted.trial._dist.test.matchersrtwisted.trial.reporterrtwisted.trial.runnerr twisted.trial.unittestr r reactormixinsr rrrr$rrr>sK 76=-+A), !^!!1-1r