Hacked By AnonymousFox

Current Path : /opt/alt/python36/lib64/python3.6/unittest/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/unittest/__pycache__/runner.cpython-36.opt-2.pyc

3

��2aG�@sjddlZddlZddlZddlmZddlmZdZGdd�de�Z	Gdd	�d	ej
�ZGd
d�de�ZdS)�N�)�result)�registerResultTc@s&eZdZdd�Zdd�Zddd�ZdS)	�_WritelnDecoratorcCs
||_dS)N)�stream)�selfr�r�+/opt/alt/python36/lib64/python3.6/runner.py�__init__sz_WritelnDecorator.__init__cCs|dkrt|��t|j|�S)Nr�__getstate__)rr)�AttributeError�getattrr)r�attrrrr	�__getattr__sz_WritelnDecorator.__getattr__NcCs|r|j|�|jd�dS)N�
)�write)r�argrrr	�writelns
z_WritelnDecorator.writeln)N)�__name__�
__module__�__qualname__r
rrrrrr	r
srcs�eZdZddZddZ�fdd�Zdd�Z�fdd	�Z�fd
d�Z�fdd
�Z	�fdd�Z
�fdd�Z�fdd�Z�fdd�Z
dd�Zdd�Z�ZS)�TextTestResult�=�F�-cs8tt|�j|||�||_|dk|_|dk|_||_dS)Nr)�superrr
r�showAll�dots�descriptions)rrr�	verbosity)�	__class__rr	r
%s


zTextTestResult.__init__cCs0|j�}|jr$|r$djt|�|f�St|�SdS)Nr)ZshortDescriptionr�join�str)r�testZdoc_first_linerrr	�getDescription,s
zTextTestResult.getDescriptioncsBtt|�j|�|jr>|jj|j|��|jjd�|jj�dS)Nz ... )rr�	startTestrrrr$�flush)rr#)r rr	r%3s
zTextTestResult.startTestcsDtt|�j|�|jr$|jjd�n|jr@|jjd�|jj�dS)N�ok�.)	rr�
addSuccessrrrrrr&)rr#)r rr	r):szTextTestResult.addSuccesscsFtt|�j||�|jr&|jjd�n|jrB|jjd�|jj�dS)N�ERROR�E)	rr�addErrorrrrrrr&)rr#�err)r rr	r,BszTextTestResult.addErrorcsFtt|�j||�|jr&|jjd�n|jrB|jjd�|jj�dS)N�FAIL�F)	rr�
addFailurerrrrrr&)rr#r-)r rr	r0JszTextTestResult.addFailurecsLtt|�j||�|jr,|jjdj|��n|jrH|jjd�|jj	�dS)Nz
skipped {0!r}�s)
rr�addSkiprrr�formatrrr&)rr#�reason)r rr	r2RszTextTestResult.addSkipcsFtt|�j||�|jr&|jjd�n|jrB|jjd�|jj�dS)Nzexpected failure�x)	rr�addExpectedFailurerrrrrr&)rr#r-)r rr	r6Zsz!TextTestResult.addExpectedFailurecsDtt|�j|�|jr$|jjd�n|jr@|jjd�|jj�dS)Nzunexpected success�u)	rr�addUnexpectedSuccessrrrrrr&)rr#)r rr	r8bsz#TextTestResult.addUnexpectedSuccesscCs6|js|jr|jj�|jd|j�|jd|j�dS)Nr*r.)rrrr�printErrorList�errors�failures)rrrr	�printErrorsjs
zTextTestResult.printErrorscCs\xV|D]N\}}|jj|j�|jjd||j|�f�|jj|j�|jjd|�qWdS)Nz%s: %sz%s)rr�
separator1r$�
separator2)rZflavourr:r#r-rrr	r9ps
zTextTestResult.printErrorList)rrrr=r>r
r$r%r)r,r0r2r6r8r<r9�
__classcell__rr)r r	rsrc@s0eZdZeZddd�dd�Zdd	�Zd
d�ZdS)
�TextTestRunnerNTrF)�	tb_localsc	CsN|dkrtj}t|�|_||_||_||_||_||_||_	|dk	rJ||_
dS)N)�sys�stderrrrrr�failfast�bufferrA�warnings�resultclass)	rrrrrDrErGrFrArrr	r
�s
zTextTestRunner.__init__cCs|j|j|j|j�S)N)rGrrr)rrrr	�_makeResult�szTextTestRunner._makeResultcCs4|j�}t|�|j|_|j|_|j|_tj���|jr^tj|j�|jdkr^tjdt	dd�t
j
�}t|dd�}|dk	r�|�z||�Wdt|dd�}|dk	r�|�Xt
j
�}WdQRX||}|j�t
|d�r�|jj|j�|j}|jjd	||d
k�rd�pd|f�|jj�d
}	}
}ytt|j|j|jf�}Wntk
�rVYnX|\}	}
}g}
|j��s�|jjd�t|j�t|j�}}|�r�|
jd|�|�r�|
jd|�n|jjd�|�r�|
jd|�|	�r�|
jd|	�|
�r|
jd|
�|
�r$|jjddj|
�f�n|jjd�|S)N�default�always�modulezPlease use assert\w+ instead.)�category�message�startTestRun�stopTestRunr>zRan %d test%s in %.3fsrr1�rZFAILEDzfailures=%dz	errors=%dZOKz
skipped=%dzexpected failures=%dzunexpected successes=%dz (%s)z, r)rIrJ)rHrrDrErArF�catch_warnings�simplefilter�filterwarnings�DeprecationWarning�timer
r<�hasattrrrr>ZtestsRun�map�lenZexpectedFailures�unexpectedSuccesses�skippedrZ
wasSuccessfulrr;r:�appendr!)rr#rZ	startTimerNrOZstopTimeZ	timeTaken�runZ
expectedFailsrYrZ�resultsZinfosZfailedZerroredrrr	r\�sr





zTextTestRunner.run)NTrFFNN)rrrrrGr
rHr\rrrr	r@xsr@)
rBrUrFrPrZsignalsrZ
__unittest�objectrZ
TestResultrr@rrrr	�<module>s[

Hacked By AnonymousFox1.0, Coded By AnonymousFox