U
    2ÜŸj„  ã                   @   sŽ   d Z ddlZddlmZ ddlmZ G dd„ dejƒZdd„ Zd	d
„ Z	G dd„ dejƒZ
G dd„ dejƒZG dd„ dƒZG dd„ dejƒZdS )z¶This module is used by test_loader to test the Trial test loading
functionality. Do NOT change the number of tests in this module.  Do NOT change
the names the tests in this module.
é    N©ÚmergeFunctionMetadata)Úunittestc                   @   s(   e Zd Zddœdd„Zddœdd„ZdS )ÚFooTestN©Úreturnc                 C   s   d S ©N© ©Úselfr	   r	   ú=/tmp/pip-unpacked-wheel-4b529toj/twisted/trial/test/sample.pyÚtest_foo   s    zFooTest.test_fooc                 C   s   d S r   r	   r
   r	   r	   r   Útest_bar   s    zFooTest.test_bar©Ú__name__Ú
__module__Ú__qualname__r   r   r	   r	   r	   r   r      s   r   c                    s   ‡ fdd„}|S )z„
    Decorate a function without preserving the name of the original function.
    Always return a function with the same name.
    c                     s
   ˆ | |ŽS r   r	   ©ÚargsÚkwargs©Úfnr	   r   ÚnameCollision   s    z#badDecorator.<locals>.nameCollisionr	   ©r   r   r	   r   r   ÚbadDecorator   s    r   c                    s   ‡ fdd„}t ˆ |ƒS )z=
    Decorate a function and preserve the original name.
    c                     s
   ˆ | |ŽS r   r	   r   r   r	   r   r   &   s    z$goodDecorator.<locals>.nameCollisionr   r   r	   r   r   ÚgoodDecorator!   s    r   c                   @   s\   e Zd Zddœdd„ZeeƒZddœdd„ZeeƒZddœdd„ZeeƒZddœd	d
„Z	dS )ÚDecorationTestNr   c                 C   s   dS )z‚
        This test method is decorated in a way that gives it a confusing name
        that collides with another method.
        Nr	   r
   r	   r	   r   Útest_badDecorator-   s    z DecorationTest.test_badDecoratorc                 C   s   dS )zQ
        This test method is decorated in a way that preserves its name.
        Nr	   r
   r	   r	   r   Útest_goodDecorator5   s    z!DecorationTest.test_goodDecoratorc                 C   s   dS )z~
        This is secretly a test method and will be decorated and then renamed so
        test discovery can find it.
        Nr	   r
   r	   r	   r   ÚrenamedDecorator<   s    zDecorationTest.renamedDecoratorc                 C   s   dS )zJ
        This isn't a test, it's just here to collide with tests.
        Nr	   r
   r	   r	   r   r   D   s    zDecorationTest.nameCollision)
r   r   r   r   r   r   r   r   Ztest_renamedDecoratorr   r	   r	   r	   r   r   ,   s   r   c                   @   s(   e Zd Zddœdd„Zddœdd„ZdS )Ú
PyunitTestNr   c                 C   s   d S r   r	   r
   r	   r	   r   r   K   s    zPyunitTest.test_fooc                 C   s   d S r   r	   r
   r	   r	   r   r   N   s    zPyunitTest.test_barr   r	   r	   r	   r   r    J   s   r    c                   @   s   e Zd Zddœdd„ZdS )ÚNotATestNr   c                 C   s   d S r   r	   r
   r	   r	   r   r   S   s    zNotATest.test_foo)r   r   r   r   r	   r	   r	   r   r!   R   s   r!   c                   @   s6   e Zd Zddœdd„Zddœdd„Zddœdd„ZdS )	ÚAlphabetTestNr   c                 C   s   d S r   r	   r
   r	   r	   r   Útest_aX   s    zAlphabetTest.test_ac                 C   s   d S r   r	   r
   r	   r	   r   Útest_b[   s    zAlphabetTest.test_bc                 C   s   d S r   r	   r
   r	   r	   r   Útest_c^   s    zAlphabetTest.test_c)r   r   r   r#   r$   r%   r	   r	   r	   r   r"   W   s   r"   )Ú__doc__r   ZpyunitZtwisted.python.utilr   Ztwisted.trialZSynchronousTestCaser   r   r   r   ZTestCaser    r!   r"   r	   r	   r	   r   Ú<module>   s   