B
    v9a                 @   s:   d dl Z d dlmZ G dd de jZedkr6e   dS )    N)LoggingResultc               @   sL   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dS )Test_FunctionTestCasec             C   s"   t dd }| | d d S )Nc               S   s   d S )N r   r   r   +/usr/lib/python3.7/test_functiontestcase.py<lambda>       z;Test_FunctionTestCase.test_countTestCases.<locals>.<lambda>   )unittestFunctionTestCaseassertEqualZcountTestCases)selftestr   r   r   test_countTestCases
   s    z)Test_FunctionTestCase.test_countTestCasesc                s`   g  t  } fdd} fdd} fdd}ddd	d
g}t|||| |  | d S )Nc                  s     d tdd S )NsetUpzraised by setUp)appendRuntimeErrorr   )eventsr   r   r      s    
zHTest_FunctionTestCase.test_run_call_order__error_in_setUp.<locals>.setUpc                  s     d d S )Nr   )r   r   )r   r   r   r      s    zGTest_FunctionTestCase.test_run_call_order__error_in_setUp.<locals>.testc                  s     d d S )NtearDown)r   r   )r   r   r   r   !   s    zKTest_FunctionTestCase.test_run_call_order__error_in_setUp.<locals>.tearDown	startTestr   addErrorstopTest)r   r	   r
   runr   )r   resultr   r   r   expectedr   )r   r   #test_run_call_order__error_in_setUp   s    z9Test_FunctionTestCase.test_run_call_order__error_in_setUpc                sd   g  t  } fdd} fdd} fdd}ddd	d
ddg}t|||| |  | d S )Nc                  s     d d S )Nr   )r   r   )r   r   r   r   3   s    zGTest_FunctionTestCase.test_run_call_order__error_in_test.<locals>.setUpc                  s     d tdd S )Nr   zraised by test)r   r   r   )r   r   r   r   6   s    
zFTest_FunctionTestCase.test_run_call_order__error_in_test.<locals>.testc                  s     d d S )Nr   )r   r   )r   r   r   r   :   s    zJTest_FunctionTestCase.test_run_call_order__error_in_test.<locals>.tearDownr   r   r   r   r   r   )r   r	   r
   r   r   )r   r   r   r   r   r   r   )r   r   "test_run_call_order__error_in_test/   s    z8Test_FunctionTestCase.test_run_call_order__error_in_testc                sf   g  t  } fdd} fdd} fdd}ddd	d
ddg}t||||  | d S )Nc                  s     d d S )Nr   )r   r   )r   r   r   r   M   s    zITest_FunctionTestCase.test_run_call_order__failure_in_test.<locals>.setUpc                  s     d d d S )Nr   zraised by test)r   Zfailr   )r   r   r   r   r   P   s    
zHTest_FunctionTestCase.test_run_call_order__failure_in_test.<locals>.testc                  s     d d S )Nr   )r   r   )r   r   r   r   T   s    zLTest_FunctionTestCase.test_run_call_order__failure_in_test.<locals>.tearDownr   r   r   r   Z
addFailurer   )r   r	   r
   r   r   )r   r   r   r   r   r   r   )r   r   r   $test_run_call_order__failure_in_testI   s    z:Test_FunctionTestCase.test_run_call_order__failure_in_testc                sd   g  t  } fdd} fdd} fdd}ddd	d
ddg}t|||| |  | d S )Nc                  s     d d S )Nr   )r   r   )r   r   r   r   g   s    zKTest_FunctionTestCase.test_run_call_order__error_in_tearDown.<locals>.setUpc                  s     d d S )Nr   )r   r   )r   r   r   r   j   s    zJTest_FunctionTestCase.test_run_call_order__error_in_tearDown.<locals>.testc                  s     d tdd S )Nr   zraised by tearDown)r   r   r   )r   r   r   r   m   s    
zNTest_FunctionTestCase.test_run_call_order__error_in_tearDown.<locals>.tearDownr   r   r   r   r   r   )r   r	   r
   r   r   )r   r   r   r   r   r   r   )r   r   &test_run_call_order__error_in_tearDownc   s    
z<Test_FunctionTestCase.test_run_call_order__error_in_tearDownc             C   s"   t dd }| | t d S )Nc               S   s   d S )Nr   r   r   r   r   r   }   r   z/Test_FunctionTestCase.test_id.<locals>.<lambda>)r	   r
   ZassertIsInstanceidstr)r   r   r   r   r   test_id|   s    zTest_FunctionTestCase.test_idc             C   s"   t dd }| | d  d S )Nc               S   s   d S )Nr   r   r   r   r   r      r   zKTest_FunctionTestCase.test_shortDescription__no_docstring.<locals>.<lambda>)r	   r
   r   shortDescription)r   r   r   r   r   #test_shortDescription__no_docstring   s    z9Test_FunctionTestCase.test_shortDescription__no_docstringc             C   s*   d}t jdd |d}| | d d S )Nzthis tests fooc               S   s   d S )Nr   r   r   r   r   r      r   zSTest_FunctionTestCase.test_shortDescription__singleline_docstring.<locals>.<lambda>)description)r	   r
   r   r!   )r   Zdescr   r   r   r   +test_shortDescription__singleline_docstring   s    zATest_FunctionTestCase.test_shortDescription__singleline_docstringN)__name__
__module____qualname__r   r   r   r   r   r    r"   r$   r   r   r   r   r      s   r   __main__)r	   Zunittest.test.supportr   ZTestCaser   r%   mainr   r   r   r   <module>   s
    