
    tf                     \    d Z ddlZddlmZmZmZmZ ddlmZ  G d dej	                  Z
dS )z!
Test Twisted's doctest support.
    N)itrialreporterrunnerunittest)mockdoctestc                   V    e Zd ZdZddZddZdej        ddfdZdd	e	ddfd
Z
ddZdS )RunnersTestsz.
    Tests for Twisted's doctest support.
    returnNc                     t          j                    }|                    t                    }d}|j        D ]<}|                     |t          j        |                                                     =dS )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   _testsassertInr   	ITestCaseid)selfloadersuiteidPrefixtests        ^/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/trial/test/test_doctest.pytest_idzRunnersTests.test_id   sw    
 "$$##K00;L 	A 	ADMM(F$4T$:$:$=$=$?$?@@@@	A 	A    c                     t          j                    }|                    t                    }|                     d|                                           dS )zP
        L{loadDoctests} loads all of the doctests in the given module.
           N)r   r   r   r   assertEqualcountTestCases)r   r   r   s      r   test_basicTrialIntegrationz'RunnersTests.test_basicTrialIntegration   sM     "$$##K00E002233333r   r   c                     t          j                    }|                    |           |                     d|j                   |                     dt          |j                             dS )z4
        Run C{suite} and check the result.
              N)r   
TestResultrunr   	successeslenfailures)r   r   results      r   _testRunzRunnersTests._testRun%   sc     $&&		&F,---C0011111r      countc                     t          j                                        t                    }|                     |           dS )zL
        Trial can correctly run doctests with its xUnit test APIs.
        Nr   r   r   r   r(   )r   r*   r   s      r   test_expectedResultsz!RunnersTests.test_expectedResults.   s8     !##00==er   c                     t          j                                        t                    }|                     |           |                     |           dS )z9
        Doctests should be runnable repeatably.
        Nr,   )r   r   s     r   test_repeatablezRunnersTests.test_repeatable5   sJ     !##00==eer   )r
   N)r)   )__name__
__module____qualname____doc__r   r   pyunit	TestSuiter(   intr-   r/    r   r   r	   r	      s         	A 	A 	A 	A4 4 4 42f. 24 2 2 2 2 # d         r   r	   )r3   r   r4   twisted.trialr   r   r   twisted.trial.testr   SynchronousTestCaser	   r7   r   r   <module>r;      s         < < < < < < < < < < < < * * * * * *. . . . .8/ . . . . .r   