Ϫf ^dZddlZddlmZmZmZmZddlmZGddejZ y)z! Test Twisted's doctest support. N)itrialreporterrunnerunittest) mockdoctestc^eZdZdZd dZd dZdejddfdZd de ddfd Z d d Z y) RunnersTestsz. Tests for Twisted's doctest support. returnNctj}|jt}d}|jD]5}|j |t j|j7y)zq Check that the id() of the doctests' case object contains the FQPN of the actual tests. z&twisted.trial.test.mockdoctest.CounterN) r TestLoader loadDoctestsr_testsassertInr ITestCaseid)selfloadersuiteidPrefixtests A/usr/lib/python3/dist-packages/twisted/trial/test/test_doctest.pytest_idzRunnersTests.test_ids^ ""$##K0;LL AD MM(F$4$4T$:$=$=$? @ Actj}|jt}|j d|j y)zP L{loadDoctests} loads all of the doctests in the given module. N)rr r r assertEqualcountTestCases)rrrs rtest_basicTrialIntegrationz'RunnersTests.test_basicTrialIntegrations;""$##K0 E0023rrctj}|j||jd|j|jdt |j y)z4 Run C{suite} and check the result. N)r TestResultrunr successeslenfailures)rrresults r_testRunzRunnersTests._testRun%sM$$& & F,,- C01rcountcttjjt}|j |y)zL Trial can correctly run doctests with its xUnit test APIs. Nrr r rr()rr)rs rtest_expectedResultsz!RunnersTests.test_expectedResults.s)!!#00= erctjjt}|j ||j |y)z9 Doctests should be runnable repeatably. Nr+)rrs rtest_repeatablezRunnersTests.test_repeatable5s5!!#00= e er)r N)) __name__ __module__ __qualname____doc__rrpyunit TestSuiter(intr,r.rrr r sC A42f..242#drr ) r3rr4 twisted.trialrrrtwisted.trial.testrSynchronousTestCaser r7rrr;s*<<*.8//.r