o
    b                     @   sJ   d Z ddlmZmZ G dd dZG dd deeZG dd deeZd	S )
zm
Direct unit tests for L{twisted.trial.unittest.SynchronousTestCase} and
L{twisted.trial.unittest.TestCase}.
    )SynchronousTestCaseTestCasec                   @   s(   e Zd ZdZdd Zdd Zdd ZdS )	TestCaseMixinz
    L{TestCase} tests.
    c                 C   s   |  d| _|  d| _dS )z
        Create a couple instances of C{MyTestCase}, each for the same test
        method, to be used in the test methods of this class.
        test_1N)
MyTestCasefirstsecondself r   B/usr/lib/python3/dist-packages/twisted/trial/test/test_testcase.pysetUp   s   zTestCaseMixin.setUpc                 C   s:   |  | j| jk |  | j| jk | | j| jk dS )z
        In order for one test method to be runnable twice, two TestCase
        instances with the same test method name must not compare as equal.
        N)
assertTruer   r   assertFalser	   r   r   r   test_equality   s   zTestCaseMixin.test_equalityc                 C   s,   i }d|| j < d|| j< | t|d dS )z
        In order for one test method to be runnable twice, two TestCase
        instances with the same test method name should not have the same
        hash value.
        N   )r   r   assertEquallen)r
   	containerr   r   r   test_hashability#   s   

zTestCaseMixin.test_hashabilityN)__name__
__module____qualname____doc__r   r   r   r   r   r   r   r      s
    	r   c                   @      e Zd ZG dd deZdS )SynchronousTestCaseTestsc                   @      e Zd ZdZdd ZdS )z#SynchronousTestCaseTests.MyTestCasezj
        Some test methods which can be used to test behaviors of
        L{SynchronousTestCase}.
        c                 C      d S Nr   r	   r   r   r   r   6      z*SynchronousTestCaseTests.MyTestCase.test_1Nr   r   r   r   r   r   r   r   r   r   0       r   N)r   r   r   r   r   r   r   r   r   r   /       r   c                   @   r   )AsynchronousTestCaseTestsc                   @   r   )z$AsynchronousTestCaseTests.MyTestCasez_
        Some test methods which can be used to test behaviors of
        L{TestCase}.
        c                 C   r   r   r   r	   r   r   r   r   C   r   z+AsynchronousTestCaseTests.MyTestCase.test_1Nr    r   r   r   r   r   =   r!   r   N)r   r   r   r   r   r   r   r   r   r#   <   r"   r#   N)r   twisted.trial.unittestr   r   r   r   r#   r   r   r   r   <module>   s
   "