AlkantarClanX12

Your IP : 18.222.56.251


Current Path : /opt/alt/python39/lib64/python3.9/unittest/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/unittest/__pycache__/runner.cpython-39.opt-2.pyc

a

R�fs�@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	�4/opt/alt/python39/lib64/python3.9/unittest/runner.py�__init__sz_WritelnDecorator.__init__cCs|dvrt|��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.startTestcsNtt|��|�|jr.|j�d�|j��n|jrJ|j�d�|j��dS)N�ok�.)	rr�
addSuccessrrrr&rrr'rr	r
r*:szTextTestResult.addSuccesscsPtt|��||�|jr0|j�d�|j��n|jrL|j�d�|j��dS)N�ERROR�E)	rr�addErrorrrrr&rr�rr#�errrr	r
r-CszTextTestResult.addErrorcsPtt|��||�|jr0|j�d�|j��n|jrL|j�d�|j��dS)N�FAIL�F)	rr�
addFailurerrrr&rrr.rr	r
r2LszTextTestResult.addFailurecsVtt|��||�|jr6|j�d�|��|j��n|jrR|j�	d�|j��dS)Nz
skipped {0!r}�s)
rr�addSkiprrr�formatr&rr)rr#�reasonrr	r
r4UszTextTestResult.addSkipcsPtt|��||�|jr0|j�d�|j��n|jrL|j�d�|j��dS)Nzexpected failure�x)	rr�addExpectedFailurerrrr&rrr.rr	r
r8^sz!TextTestResult.addExpectedFailurecsNtt|��|�|jr.|j�d�|j��n|jrJ|j�d�|j��dS)Nzunexpected success�u)	rr�addUnexpectedSuccessrrrr&rrr'rr	r
r:gsz#TextTestResult.addUnexpectedSuccesscCs@|js|jr |j��|j��|�d|j�|�d|j�dS)Nr+r0)rrrrr&�printErrorList�errors�failures�rr	r	r
�printErrorsps


zTextTestResult.printErrorscCsb|D]X\}}|j�|j�|j�d||�|�f�|j�|j�|j�d|�|j��qdS)Nz%s: %sz%s)rr�
separator1r$�
separator2r&)rZflavourr<r#r/r	r	r
r;ws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|durtj}t|�|_||_||_||_||_||_||_	|durJ||_
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._makeResultcCsl|��}t|�|j|_|j|_|j|_t����|jr^t�|j�|jdvr^tjdt	dd�t
��}t|dd�}|dur�|�z&||�Wt|dd�}|dur�|�nt|dd�}|dur�|�0t
��}Wd�n1s�0Y||}|�
�t|d��r|j�|j�|j}|j�d||d	k�r4d
�p6d|f�|j��d}	}
}ztt|j|j|jf�}Wnt�y�Yn0|\}	}
}g}
|���s�|j�d
�t|j�t|j�}}|�r�|
�d|�|�r�|
�d|�n|j�d�|�r
|
�d|�|	�r|
�d|	�|
�r2|
�d|
�|
�rR|j�dd�|
�f�n|j�d�|j��|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!r&)rr#rZ	startTimerQrRZstopTimeZ	timeTaken�runZ
expectedFailsr]r^ZresultsZinfosZfailedZerroredr	r	r
r`�s�

�
�&�
�


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