AlkantarClanX12

Your IP : 52.14.27.122


Current Path : /proc/self/root/lib64/python3.8/unittest/__pycache__/
Upload File :
Current File : //proc/self/root/lib64/python3.8/unittest/__pycache__/runner.cpython-38.opt-2.pyc

U

e5dW�@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	�'/usr/lib64/python3.8/unittest/runner.py�__init__sz_WritelnDecorator.__init__cCs|dkrt|��t|j|�S)N)r�__getstate__)�AttributeError�getattrr)r�attrr	r	r
�__getattr__sz_WritelnDecorator.__getattr__NcCs|r|�|�|�d�dS�N�
)�write)r�argr	r	r
�writelns
z_WritelnDecorator.writeln)N)�__name__�
__module__�__qualname__rrrr	r	r	r
r
srcs�eZdZdZdZ�fdd�Zdd�Z�fdd�Z�fd	d
�Z�fdd�Z	�fd
d�Z
�fdd�Z�fdd�Z�fdd�Z
dd�Zdd�Z�ZS)�TextTestResultzF======================================================================zF----------------------------------------------------------------------cs8tt|��|||�||_|dk|_|dk|_||_dS)Nr)�superrrr�showAll�dots�descriptions)rrr�	verbosity��	__class__r	r
r%s


zTextTestResult.__init__cCs0|��}|jr$|r$d�t|�|f�St|�SdSr)ZshortDescriptionr�join�str)r�testZdoc_first_liner	r	r
�getDescription,s
zTextTestResult.getDescriptioncsBtt|��|�|jr>|j�|�|��|j�d�|j��dS)Nz ... )rr�	startTestrrrr$�flush�rr#rr	r
r%3s
zTextTestResult.startTestcsDtt|��|�|jr$|j�d�n|jr@|j�d�|j��dS)N�ok�.)	rr�
addSuccessrrrrrr&r'rr	r
r*:szTextTestResult.addSuccesscsFtt|��||�|jr&|j�d�n|jrB|j�d�|j��dS)N�ERROR�E)	rr�addErrorrrrrrr&�rr#�errrr	r
r-BszTextTestResult.addErrorcsFtt|��||�|jr&|j�d�n|jrB|j�d�|j��dS)N�FAIL�F)	rr�
addFailurerrrrrr&r.rr	r
r2JszTextTestResult.addFailurecsLtt|��||�|jr,|j�d�|��n|jrH|j�d�|j�	�dS)Nz
skipped {0!r}�s)
rr�addSkiprrr�formatrrr&)rr#�reasonrr	r
r4RszTextTestResult.addSkipcsFtt|��||�|jr&|j�d�n|jrB|j�d�|j��dS)Nzexpected failure�x)	rr�addExpectedFailurerrrrrr&r.rr	r
r8Zsz!TextTestResult.addExpectedFailurecsDtt|��|�|jr$|j�d�n|jr@|j�d�|j��dS)Nzunexpected success�u)	rr�addUnexpectedSuccessrrrrrr&r'rr	r
r:bsz#TextTestResult.addUnexpectedSuccesscCs6|js|jr|j��|�d|j�|�d|j�dS)Nr+r0)rrrr�printErrorList�errors�failures�rr	r	r
�printErrorsjs
zTextTestResult.printErrorscCsX|D]N\}}|j�|j�|j�d||�|�f�|j�|j�|j�d|�qdS)Nz%s: %sz%s)rr�
separator1r$�
separator2)rZflavourr<r#r/r	r	r
r;ps
zTextTestResult.printErrorList)rrrr@rArr$r%r*r-r2r4r8r:r?r;�
__classcell__r	r	rr
rsrc@s0eZdZeZddd�dd�Zdd	�Zd
d�ZdS)
�TextTestRunnerNTrF)�	tb_localsc	CsN|dkrtj}t|�|_||_||_||_||_||_||_	|dk	rJ||_
dSr)�sys�stderrrrrr�failfast�bufferrD�warnings�resultclass)	rrrrrGrHrJrIrDr	r	r
r�s
zTextTestRunner.__init__cCs|�|j|j|j�Sr)rJrrrr>r	r	r
�_makeResult�szTextTestRunner._makeResultcCs2|��}t|�|j|_|j|_|j|_t����|jr^t�|j�|jdkr^tjdt	dd�t
��}t|dd�}|dk	r�|�z||�W5t|dd�}|dk	r�|�Xt
��}W5QRX||}|�
�t|d�r�|j�|j�|j}|j�d||d	ko�d
�pd|f�|j��d}	}
}ztt|j|j|jf�}Wntk
�rTYnX|\}	}
}g}
|���s�|j�d
�t|j�t|j�}}|�r�|
�d|�|�r�|
�d|�n|j�d�|�r�|
�d|�|	�r�|
�d|	�|
�r|
�d|
�|
�r"|j�dd�|
�f�n|j�d�|S)N)�default�always�modulezPlease use assert\w+ instead.)�category�message�startTestRun�stopTestRunrAzRan %d test%s in %.3fsrr3�rZFAILEDzfailures=%dz	errors=%dZOKz
skipped=%dzexpected failures=%dzunexpected successes=%dz (%s)z, r)rKrrGrHrDrI�catch_warnings�simplefilter�filterwarnings�DeprecationWarning�time�perf_counterrr?�hasattrrrrAZtestsRun�map�lenZexpectedFailures�unexpectedSuccesses�skippedr
Z
wasSuccessfulrr=r<�appendr!)rr#rZ	startTimerQrRZstopTimeZ	timeTaken�runZ
expectedFailsr]r^ZresultsZinfosZfailedZerroredr	r	r
r`�sx

�
�
�


zTextTestRunner.run)NTrFFNN)rrrrrJrrKr`r	r	r	r
rCxs��rC)
rErXrIrSrZsignalsrZ
__unittest�objectrZ
TestResultrrCr	r	r	r
�<module>s[