§
    ÈtºfÍ  ã            	       ób  — d Z ddlZddlZddlZddlmZmZ ddlm	Z	 ddl
mZ ddlmZmZ ddlmZ  G d„ d	ej        ¦  «        Z e	ej        ¦  «         G d
„ d ej        ej        d¦  «        ¦  «        ¦   «         Zd„ Zd„ Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z ej        eej        ej        ¦  «          ej        eej        ej        ¦  «          eedd¦  «        Zer ej        eeej        ¦  «         deej        ej        f         deej                 fd„ZdS )z-
Infrastructure for test running and suites.
é    N)ÚIteratorÚUnion)Úimplementer)Ú
components)ÚitrialÚreporter)Ú_logObserverc                   ó   — e Zd ZdZd„ ZdS )Ú	TestSuitezh
    Extend the standard library's C{TestSuite} with a consistently overrideable
    C{run} method.
    c                 óB   — | j         D ]}|j        r n ||¦  «         Œ|S )z;
        Call C{run} on every member of the suite.
        )Ú_testsÚ
shouldStop)ÚselfÚresultÚtests      úY/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/trial/_asyncrunner.pyÚrunzTestSuite.run   s9   € ð ”Kð 	ð 	ˆDØÔ ð Ø�ØˆD�‰LŒLˆLˆLØˆó    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   © r   r   r   r      s-   € € € € € ðð ð
ð ð ð ð r   r   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚTestDecoratorz—
    Decorator for test cases.

    @param _originalTest: The wrapped instance of test.
    @type _originalTest: A provider of L{itrial.ITestCase}
    c                 ó,   — |                       |¦  «        S ©zQ
        Run the unit test.

        @param result: A TestResult object.
        )r   ©r   r   s     r   Ú__call__zTestDecorator.__call__4   s   € ð �xŠx˜ÑÔÐr   c                 óf   — | j                              t          j        || j        ¦  «        ¦  «        S r   )Ú_originalTestr   r   Ú_AdaptedReporterÚ	__class__r   s     r   r   zTestDecorator.run<   s*   € ð Ô!×%Ò%¥hÔ&?ÀÈÌÑ&WÔ&WÑXÔXÐXr   N)r   r   r   r   r    r   r   r   r   r   r   '   sA   € € € € € ðð ð ð  ð  ðYð Yð Yð Yð Yr   r   r"   c                 ó   — g | _         dS )zÕ
    Clear all tests from C{suite}.

    This messes with the internals of C{suite}. In particular, it assumes that
    the suite keeps all of its tests in a list in an instance variable called
    C{_tests}.
    N)r   )Úsuites    r   Ú_clearSuiter'   E   s   € ð €E„L€L€Lr   c                 óÌ   — 	 t          | ¦  «        }n# t          $ r  || ¦  «        cY S w xY wt          | ¦  «         |D ]%}|                      t	          ||¦  «        ¦  «         Œ&| S )a2  
    Decorate all test cases in C{test} with C{decorator}.

    C{test} can be a test case or a test suite. If it is a test suite, then the
    structure of the suite is preserved.

    L{decorate} tries to preserve the class of the test suites it finds, but
    assumes the presence of the C{_tests} attribute on the suite.

    @param test: The C{TestCase} or C{TestSuite} to decorate.

    @param decorator: A unary callable used to decorate C{TestCase}s.

    @return: A decorated C{TestCase} or a C{TestSuite} containing decorated
        C{TestCase}s.
    )ÚiterÚ	TypeErrorr'   ÚaddTestÚdecorate)r   Ú	decoratorÚtestsÚcases       r   r,   r,   P   s†   € ð$Ý�T‘
”
ˆˆøÝð ð ð Øˆy˜‰ŒÐÐÐðøøøõ �ÑÔÐàð 0ð 0ˆØ�Š•X˜d IÑ.Ô.Ñ/Ô/Ð/Ð/Ø€Ks   ‚ ’*©*c                   ó   — e Zd ZdZdS )Ú_PyUnitTestCaseAdapterz2
    Adapt from pyunit.TestCase to ITestCase.
    N)r   r   r   r   r   r   r   r1   r1   o   s   € € € € € ðð ð ð r   r1   c                   ó   — e Zd ZdZd„ ZdS )Ú_BrokenIDTestCaseAdapterz£
    Adapter for pyunit-style C{TestCase} subclasses that have undesirable id()
    methods. That is C{unittest.FunctionTestCase} and C{unittest.DocTestCase}.
    c                 ón   — | j                              ¦   «         }|�|S | j                              ¦   «         S )zH
        Return the fully-qualified Python name of the doctest.
        )r"   ÚshortDescriptionÚid)r   ÚtestIDs     r   r6   z_BrokenIDTestCaseAdapter.id{   s8   € ð Ô#×4Ò4Ñ6Ô6ˆØÐØˆMØÔ!×$Ò$Ñ&Ô&Ð&r   N)r   r   r   r   r6   r   r   r   r3   r3   u   s-   € € € € € ðð ð
'ð 'ð 'ð 'ð 'r   r3   c                   ó   — e Zd ZdZd„ ZdS )Ú _ForceGarbageCollectionDecoratorzª
    Forces garbage collection to be run before and after the test. Any errors
    logged during the post-test collection are added to the test result as
    errors.
    c                 óR  — t          j        ¦   «          t                               | |¦  «         t	          j        ¦   «          t          j        ¦   «          t	          j        ¦   «         D ]}|                     | |¦  «         Œt	          j        ¦   «          t	          j	        ¦   «          d S )N)
ÚgcÚcollectr   r   r	   Ú_addÚ	getErrorsÚaddErrorÚflushErrorsÚ_remove)r   r   Úerrors      r   r   z$_ForceGarbageCollectionDecorator.runŒ   s�   € Ý
Œ
‰ŒˆÝ×Ò˜$ Ñ'Ô'Ð'ÝÔÑÔÐÝ
Œ
‰ŒˆÝ!Ô+Ñ-Ô-ð 	)ð 	)ˆEØ�OŠO˜D %Ñ(Ô(Ð(Ð(ÝÔ Ñ"Ô"Ð"ÝÔÑÔÐÐÐr   Nr   r   r   r   r9   r9   …   s-   € € € € € ðð ðð ð ð ð r   r9   ÚDocTestCaseÚtestSuiteOrCaseÚreturnc              #   óˆ   K  — 	 t          | ¦  «        }|D ]}t          |¦  «        E d{V —† ŒdS # t          $ r | V — Y dS w xY w)zF
    Iterate through all of the test cases in C{testSuiteOrCase}.
    N)r)   Ú_iterateTestsr*   )rD   r&   r   s      r   rG   rG   ¤   sˆ   è è € ð+Ý�_Ñ%Ô%ˆð ð 	+ð 	+ˆDÝ$ TÑ*Ô*Ð*Ð*Ð*Ð*Ð*Ð*Ð*Ð*ð	+ð 	+øõ ð ð ð ØÐÐÐÐÐÐðøøøs   „/ ¯AÁ A) r   Údoctestr;   ÚunittestÚpyunitÚtypingr   r   Úzope.interfacer   Útwisted.pythonr   Útwisted.trialr   r   Útwisted.trial._synctestr	   r   Ú	ITestCaseÚproxyForInterfacer   r'   r,   r1   r3   r9   ÚregisterAdapterÚTestCaseÚFunctionTestCaseÚgetattrÚ_docTestCaserG   r   r   r   ú<module>rW      s†  ðð
ð ð
 €€€Ø 	€	€	€	Ø Ð Ð Ð Ø "Ð "Ð "Ð "Ð "Ð "Ð "Ð "à &Ð &Ð &Ð &Ð &Ð &à %Ð %Ð %Ð %Ð %Ð %Ø *Ð *Ð *Ð *Ð *Ð *Ð *Ð *Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0ðð ð ð ð �Ô ñ ô ð ð" €ˆVÔÑÔðYð Yð Yð Yð YØ €JÔ ØÔ˜/ñô ñYô Yñ ÔðYð:ð ð ðð ð ð>ð ð ð ð ˜]ñ ô ð ð'ð 'ð 'ð 'ð 'Ð5ñ 'ô 'ð 'ð ð ð ð ð  }ñ ô ð ð$ €
Ô Ð1°6´?ÀFÔDTÑ UÔ UÐ Uð €
Ô Ø˜fÔ5°vÔ7Gñô ð ð
 ˆw�w ¨tÑ4Ô4€Øð YØ€JÔÐ7¸ÀvÔGWÑXÔXÐXð+Ø˜6œ?¨FÔ,<Ð<Ô=ð+àˆfÔÔð+ð +ð +ð +ð +ð +r   