AlkantarClanX12

Your IP : 18.227.0.255


Current Path : /opt/alt/python35/lib64/python3.5/unittest/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/unittest/__pycache__/runner.cpython-35.opt-2.pyc



���]F�@s�ddlZddlZddlZddlmZddlmZdZGdd�de�Z	Gdd	�d	ej
�ZGd
d�de�ZdS)�N�)�result)�registerResultTc@s7eZdZdd�Zdd�Zddd�ZdS)�_WritelnDecoratorcCs
||_dS)N)�stream)�selfr�r�+/opt/alt/python35/lib64/python3.5/runner.py�__init__sz_WritelnDecorator.__init__cCs(|dkrt|��t|j|�S)Nr�__getstate__)rr)�AttributeError�getattrr)r�attrrrr	�__getattr__sz_WritelnDecorator.__getattr__NcCs$|r|j|�|jd�dS)N�
)�write)r�argrrr	�writelns
z_WritelnDecorator.writeln)�__name__�
__module__�__qualname__r
rrrrrr	r
srcs�eZdZddZddZ�fdd�Zdd�Z�fdd	�Z�fd
d�Z�fdd
�Z	�fdd�Z
�fdd�Z�fdd�Z�fdd�Z
dd�Zdd�Z�S)�TextTestResult�=�F�-csPtt|�j|||�||_|dk|_|dk|_||_dS)Nr)�superrr
r�showAll�dots�descriptions)rrr�	verbosity)�	__class__rr	r
%s
	zTextTestResult.__init__cCsB|j�}|jr4|r4djt|�|f�St|�SdS)Nr)ZshortDescriptionr�join�str)r�testZdoc_first_linerrr	�getDescription,szTextTestResult.getDescriptioncsYtt|�j|�|jrU|jj|j|��|jjd�|jj�dS)Nz ... )rr�	startTestrrrr$�flush)rr#)r rr	r%3s
	zTextTestResult.startTestcs\tt|�j|�|jr2|jjd�n&|jrX|jjd�|jj�dS)N�ok�.)	rr�
addSuccessrrrrrr&)rr#)r rr	r):s		zTextTestResult.addSuccesscs_tt|�j||�|jr5|jjd�n&|jr[|jjd�|jj�dS)N�ERROR�E)	rr�addErrorrrrrrr&)rr#�err)r rr	r,Bs		zTextTestResult.addErrorcs_tt|�j||�|jr5|jjd�n&|jr[|jjd�|jj�dS)N�FAIL�F)	rr�
addFailurerrrrrr&)rr#r-)r rr	r0Js		zTextTestResult.addFailurecshtt|�j||�|jr>|jjdj|��n&|jrd|jjd�|jj	�dS)Nz
skipped {0!r}�s)
rr�addSkiprrr�formatrrr&)rr#�reason)r rr	r2Rs		zTextTestResult.addSkipcs_tt|�j||�|jr5|jjd�n&|jr[|jjd�|jj�dS)Nzexpected failure�x)	rr�addExpectedFailurerrrrrr&)rr#r-)r rr	r6Zs		z!TextTestResult.addExpectedFailurecs\tt|�j|�|jr2|jjd�n&|jrX|jjd�|jj�dS)Nzunexpected success�u)	rr�addUnexpectedSuccessrrrrrr&)rr#)r rr	r8bs		z#TextTestResult.addUnexpectedSuccesscCsI|js|jr|jj�|jd|j�|jd|j�dS)Nr*r.)rrrr�printErrorList�errors�failures)rrrr	�printErrorsjs
zTextTestResult.printErrorscCsxxq|D]i\}}|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<r9rr)r r	rs

rc@sUeZdZeZddddddddddd�Zdd	�Zd
d�ZdS)�TextTestRunnerNTrF�	tb_localsc	Css|dkrtj}t|�|_||_||_||_||_||_||_	|dk	ro||_
dS)N)�sys�stderrrrrr�failfast�bufferr@�warnings�resultclass)	rrrrrCrDrFrEr@rrr	r
�s							zTextTestRunner.__init__cCs|j|j|j|j�S)N)rFrrr)rrrr	�_makeResult�szTextTestRunner._makeResultcCs�|j�}t|�|j|_|j|_|j|_tj���|jr�tj|j�|jdkr�tjddt	dd�t
j
�}t|dd�}|dk	r�|�z||�Wdt|dd�}|dk	r�|�Xt
j
�}WdQRX||}|j�t
|d	�r9|jj|j�|j}|jjd
||dkrcdpfd
|f�|jj�d}	}
}y%tt|j|j|jf�}Wntk
r�YnX|\}	}
}g}
|j�sG|jjd�t|j�t|j�}}|r-|
jd|�|rW|
jd|�n|jjd�|rn|
jd|�|	r�|
jd|	�|
r�|
jd|
�|
r�|jjddj|
�f�n|jjd�|S)N�default�always�module�category�messagezPlease use assert\w+ instead.�startTestRun�stopTestRunr>zRan %d test%s in %.3fsrr1�rZFAILEDzfailures=%dz	errors=%dZOKz
skipped=%dzexpected failures=%dzunexpected successes=%dz (%s)z, r)rHrI)rGrrCrDr@rE�catch_warnings�simplefilter�filterwarnings�DeprecationWarning�timer
r<�hasattrrrr>ZtestsRun�map�lenZexpectedFailures�unexpectedSuccesses�skippedrZ
wasSuccessfulrr;r:�appendr!)rr#rZ	startTimerMrNZstopTimeZ	timeTaken�runZ
expectedFailsrXrY�resultsZinfosZfailedZerroredrrr	r[�sr

	

	#

#zTextTestRunner.run)rrrrrFr
rGr[rrrr	r?xs	r?)
rArTrErOrZsignalsrZ
__unittest�objectrZ
TestResultrr?rrrr	�<module>s[