
    Vh
                         d Z ddlmZ ddlmZ  edd       G d de             Z edd       G d	 d
e             Z G d de      Z G d de      Z G d de      Z	y)z!
Tests for L{twisted.trial.util}
    )skipIf)TestCaseTz.Skip all tests when @skipIf is used on a classc                        e Zd ZdZddZddZy)SkipDecoratorUsedOnClasszZ
    All tests should be skipped because @skipIf decorator is used on
    this class.
    Nc                     t        d      Nz%Test should skip and never reach here	Exceptionselfs    L/home/dcms/DCMS/lib/python3.12/site-packages/twisted/trial/test/test_skip.pytest_shouldNeverRun_1z.SkipDecoratorUsedOnClass.test_shouldNeverRun_1       ?@@    c                     t        d      r   r	   r   s    r   test_shouldNeverRun_2z.SkipDecoratorUsedOnClass.test_shouldNeverRun_2   r   r   returnN__name__
__module____qualname____doc__r   r    r   r   r   r          
AAr   r    c                        e Zd ZdZddZddZy)'SkipDecoratorUsedOnClassWithEmptyReasonz
    All tests should be skipped because @skipIf decorator is used on
    this class, even if the reason is an empty string
    Nc                     t        d      r   r	   r   s    r   r   z=SkipDecoratorUsedOnClassWithEmptyReason.test_shouldNeverRun_1#   r   r   c                     t        d      r   r	   r   s    r   r   z=SkipDecoratorUsedOnClassWithEmptyReason.test_shouldNeverRun_2&   r   r   r   r   r   r   r   r   r      r   r   r   c                       e Zd ZdZ edd      dd       Z edd      dd       ZddZ ed	d
      dd       Z ed	d      dd       Z	y)SkipDecoratorUsedOnMethodsI
    Only methods where @skipIf decorator is used should be skipped.
    Tz"skipIf decorator used so skip testNc                     t        d      r   r	   r   s    r   test_shouldNeverRunz.SkipDecoratorUsedOnMethods.test_shouldNeverRun/       ?@@r   r   c                     t        d      r   r	   r   s    r   "test_shouldNeverRunWithEmptyReasonz=SkipDecoratorUsedOnMethods.test_shouldNeverRunWithEmptyReason3   r&   r   c                 (    | j                  dd       y NTz"Test should run and not be skipped
assertTruer   s    r   test_shouldShouldRunz/SkipDecoratorUsedOnMethods.test_shouldShouldRun7       BCr   Fzshould not skipc                 (    | j                  dd       y r*   r+   r   s    r   #test_shouldShouldRunWithSkipIfFalsez>SkipDecoratorUsedOnMethods.test_shouldShouldRunWithSkipIfFalse:       BCr   c                 (    | j                  dd       y r*   r+   r   s    r   .test_shouldShouldRunWithSkipIfFalseEmptyReasonzISkipDecoratorUsedOnMethods.test_shouldShouldRunWithSkipIfFalseEmptyReason>   r1   r   r   )
r   r   r   r   r   r%   r(   r-   r0   r3   r   r   r   r"   r"   *   s     D67A 8A D"A AD E$%D &D E2D Dr   r"   c                   $    e Zd ZdZdZddZddZy)SkipAttributeOnClasszV
    All tests should be skipped because skip attribute is set on
    this class.
    z5'skip' attribute set on this class, so skip all testsNc                     t        d      r   r	   r   s    r   test_onezSkipAttributeOnClass.test_oneK   r   r   c                     t        d      r   r	   r   s    r   test_twozSkipAttributeOnClass.test_twoN   r   r   r   )r   r   r   r   skipr7   r9   r   r   r   r5   r5   C   s    
 CDAAr   r5   c                   .    e Zd ZdZddZde_        ddZy)SkipAttributeOnMethodsr#   Nc                     t        d      )NzShould never reach herer	   r   s    r   r7   zSkipAttributeOnMethods.test_oneW   s    122r   z'skip test, skip attribute set on methodc                 (    | j                  dd       y r*   r+   r   s    r   test_shouldNotSkipz)SkipAttributeOnMethods.test_shouldNotSkip\   r.   r   r   )r   r   r   r   r7   r:   r?   r   r   r   r<   r<   R   s    3 >HMDr   r<   N)
r   unittestr   twisted.trial.unittestr   r   r   r"   r5   r<   r   r   r   <module>rB      s   
  + >?
Ax 
A @
A b
Ah 
A 
AD D2A8 ADX Dr   