Ë
    oje  ã                   ó�   — d Z ddlZddlmZ ddlmZ  G d„ dej                  «      Z G d„ d«      Z G d	„ d
ej                  «      Z	y)zÔ
Sample test cases defined using the standard library L{unittest.TestCase}
class which are used as data by test cases which are actually part of the
trial test suite to verify handling of handling of such cases.
é    N)Úexc_info)ÚFailurec                   óN   — e Zd Zd„ Zd„ Zd„ Z ej                  d«      d„ «       Zy)Ú
PyUnitTestc                  ó   — y)z!
        A passing test.
        N© ©Úselfs    ú@/usr/lib/python3/dist-packages/twisted/trial/test/pyunitcases.pyÚ	test_passzPyUnitTest.test_pass   ó   � ó    c                 ó   — t        d«      ‚)zE
        A test which raises an exception to cause an error.
        zpyunit error)Ú	Exceptionr	   s    r   Ú
test_errorzPyUnitTest.test_error   s   € ô ˜Ó'Ð'r   c                 ó&   — | j                  d«       y)zQ
        A test which uses L{unittest.TestCase.fail} to cause a failure.
        zpyunit failureN)Úfailr	   s    r   Ú	test_failzPyUnitTest.test_fail   s   € ð 	�	‰	Ð"Õ#r   zpyunit skipc                  ó   — y)zS
        A test which uses the L{unittest.skip} decorator to cause a skip.
        Nr   r	   s    r   Ú	test_skipzPyUnitTest.test_skip"   r   r   N)	Ú__name__Ú
__module__Ú__qualname__r   r   r   ÚunittestÚskipr   r   r   r   r   r      s0   „ òò
(ò$ð €X‡]�]�=Ó!ñó "ñr   r   c                   ó   — e Zd ZdZdefd„Zy)Ú_NonStringIdzÚ
    A class that looks a little like a TestCase, but not enough so to
    actually be used as one.  This helps L{BrokenRunInfrastructure} use some
    interfaces incorrectly to provoke certain failure conditions.
    Úreturnc                 ó   — t        «       S )N)Úobjectr	   s    r   Úidz_NonStringId.id0   s	   € Ü‹xˆr   N)r   r   r   Ú__doc__r    r!   r   r   r   r   r   )   s   „ ñð�Fô r   r   c                   ó:   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
y	)
ÚBrokenRunInfrastructurezu
    A test suite that is broken at the level of integration between
    L{TestCase.run} and the results object.
    c                 ó:   —  t        | | j                  «      |«      S )zß
        Override the normal C{run} behavior to pass the result object
        along to the test method.  Each test method needs the result object so
        that it can implement its particular kind of brokenness.
        )ÚgetattrÚ_testMethodName©r
   Úresults     r   ÚrunzBrokenRunInfrastructure.run:   s   € ð 3Œw�t˜T×1Ñ1Ó2°6Ó:Ð:r   c                 ó6   — |j                  t        «       «       y)zA
        Violate the L{TestResult.addSuccess} interface.
        N)Ú
addSuccessr   r(   s     r   Útest_addSuccessz'BrokenRunInfrastructure.test_addSuccessB   s   € ð
 	×Ñœ,›.Õ)r   c                 ó‚   — 	 t        d«      ‚# t        $ r t        «       }Y nw xY w|j                  t	        «       |«       y)z?
        Violate the L{TestResult.addError} interface.
        Útest_addErrorN)r   ÚBaseExceptionr   ÚaddErrorr   ©r
   r)   Úerrs      r   r/   z%BrokenRunInfrastructure.test_addErrorI   s:   € ð	Ü˜OÓ,Ð,øÜò 	Ü“*ŠCð	úð 	�‰œ›¨Õ,ó   ‚ �#¢#c                 ó‚   — 	 t        d«      ‚# t        $ r t        «       }Y nw xY w|j                  t	        «       |«       y)zA
        Violate the L{TestResult.addFailure} interface.
        Útest_addFailureN)r   r0   r   Ú
addFailurer   r2   s      r   r6   z'BrokenRunInfrastructure.test_addFailureT   s=   € ð	ÜÐ-Ó.Ð.øÜò 	Ü“*ŠCð	úð 	×Ñœ,›.¨#Õ.r4   c                 ó8   — |j                  t        «       d«       y)z>
        Violate the L{TestResult.addSkip} interface.
        Útest_addSkipN)ÚaddSkipr   r(   s     r   r9   z$BrokenRunInfrastructure.test_addSkip_   s   € ð 	�‰”|“~ ~Õ6r   c                 ó‚   — 	 t        d«      ‚# t        $ r t        «       }Y nw xY w|j                  t	        «       |«       y)zI
        Violate the L{TestResult.addExpectedFailure} interface.
        Útest_addExpectedFailureN)r   r0   r   ÚaddExpectedFailurer   r2   s      r   r<   z/BrokenRunInfrastructure.test_addExpectedFailuree   s;   € ð	ÜÐ5Ó6Ð6øÜò 	Ü“)ŠCð	úà×!Ñ!¤,£.°#Õ6r4   c                 ó6   — |j                  t        «       «       y)zK
        Violate the L{TestResult.addUnexpectedSuccess} interface.
        N)ÚaddUnexpectedSuccessr   r(   s     r   Útest_addUnexpectedSuccessz1BrokenRunInfrastructure.test_addUnexpectedSuccesso   s   € ð 	×#Ñ#¤L£NÕ3r   N)r   r   r   r"   r*   r-   r/   r6   r9   r<   r@   r   r   r   r$   r$   4   s*   „ ñò
;ò*ò	-ò	/ò7ò7ó4r   r$   )
r"   r   Úsysr   Útwisted.python.failurer   ÚTestCaser   r   r$   r   r   r   ú<module>rD      sC   ðñó Ý å *ô�×"Ñ"ô ÷2ñ ô?4˜h×/Ñ/õ ?4r   