o
    ¼>hÃ
  ã                   @   s„   d Z ddlmZ ddlmZ eddƒG dd„ deƒƒZeddƒG d	d
„ d
eƒƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZ	dS )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d„Zddd„ZdS )	ÚSkipDecoratorUsedOnClasszZ
    All tests should be skipped because @skipIf decorator is used on
    this class.
    ÚreturnNc                 C   ó   t dƒ‚©Nz%Test should skip and never reach here©Ú	Exception©Úself© r   ú|/var/www/vedio/testing/chatpythonscript.ninositsolution.com/env/lib/python3.10/site-packages/twisted/trial/test/test_skip.pyÚtest_shouldNeverRun_1   ó   z.SkipDecoratorUsedOnClass.test_shouldNeverRun_1c                 C   r   r   r	   r   r   r   r   Útest_shouldNeverRun_2   r   z.SkipDecoratorUsedOnClass.test_shouldNeverRun_2©r   N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      ó    
r   Ú c                   @   r   )	Ú'SkipDecoratorUsedOnClassWithEmptyReasonz€
    All tests should be skipped because @skipIf decorator is used on
    this class, even if the reason is an empty string
    r   Nc                 C   r   r   r	   r   r   r   r   r   #   r   z=SkipDecoratorUsedOnClassWithEmptyReason.test_shouldNeverRun_1c                 C   r   r   r	   r   r   r   r   r   &   r   z=SkipDecoratorUsedOnClassWithEmptyReason.test_shouldNeverRun_2r   r   r   r   r   r   r      r   r   c                   @   sj   e Zd ZdZeddƒddd„ƒZeddƒdd	d
„ƒZddd„Zeddƒddd„ƒZeddƒddd„ƒZ	dS )ÚSkipDecoratorUsedOnMethodsúI
    Only methods where @skipIf decorator is used should be skipped.
    Tz"skipIf decorator used so skip testr   Nc                 C   r   r   r	   r   r   r   r   Útest_shouldNeverRun/   ó   z.SkipDecoratorUsedOnMethods.test_shouldNeverRunr   c                 C   r   r   r	   r   r   r   r   Ú"test_shouldNeverRunWithEmptyReason3   r   z=SkipDecoratorUsedOnMethods.test_shouldNeverRunWithEmptyReasonc                 C   ó   |   dd¡ d S ©NTz"Test should run and not be skipped©Ú
assertTruer   r   r   r   Útest_shouldShouldRun7   ó   z/SkipDecoratorUsedOnMethods.test_shouldShouldRunFzshould not skipc                 C   r    r!   r"   r   r   r   r   Ú#test_shouldShouldRunWithSkipIfFalse:   ó   z>SkipDecoratorUsedOnMethods.test_shouldShouldRunWithSkipIfFalsec                 C   r    r!   r"   r   r   r   r   Ú.test_shouldShouldRunWithSkipIfFalseEmptyReason>   r'   zISkipDecoratorUsedOnMethods.test_shouldShouldRunWithSkipIfFalseEmptyReasonr   )
r   r   r   r   r   r   r   r$   r&   r(   r   r   r   r   r   *   s    
r   c                   @   s(   e Zd ZdZdZd	dd„Zd	dd„ZdS )
ÚSkipAttributeOnClasszV
    All tests should be skipped because skip attribute is set on
    this class.
    z5'skip' attribute set on this class, so skip all testsr   Nc                 C   r   r   r	   r   r   r   r   Útest_oneK   r   zSkipAttributeOnClass.test_onec                 C   r   r   r	   r   r   r   r   Útest_twoN   r   zSkipAttributeOnClass.test_twor   )r   r   r   r   Úskipr*   r+   r   r   r   r   r)   C   s
    
r)   c                   @   s*   e Zd ZdZd	dd„Zde_d	dd„ZdS )
ÚSkipAttributeOnMethodsr   r   Nc                 C   r   )NzShould never reach herer	   r   r   r   r   r*   W   r   zSkipAttributeOnMethods.test_onez'skip test, skip attribute set on methodc                 C   r    r!   r"   r   r   r   r   Útest_shouldNotSkip\   r%   z)SkipAttributeOnMethods.test_shouldNotSkipr   )r   r   r   r   r*   r,   r.   r   r   r   r   r-   R   s
    
r-   N)
r   Úunittestr   Útwisted.trial.unittestr   r   r   r   r)   r-   r   r   r   r   Ú<module>   s   