Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/unittest/test/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/unittest/test/__pycache__/support.cpython-35.opt-1.pyc



��Yf��@s�ddlZGdd�de�ZGdd�de�ZGdd�dej�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZdS)�Nc@s.eZdZdZdd�Zdd�ZdS)�TestEqualityzUsed as a mixin for TestCasecCs>x7|jD],\}}|j||�|j||�q
WdS)N)�eq_pairsZassertEqual)�self�obj_1�obj_2�r�:/opt/alt/python35/lib64/python3.5/unittest/test/support.py�test_eqszTestEquality.test_eqcCs>x7|jD],\}}|j||�|j||�q
WdS)N)�ne_pairsZassertNotEqual)rrrrrr�test_neszTestEquality.test_neN)�__name__�
__module__�__qualname__�__doc__r	rrrrrrsrc@s"eZdZdZdd�ZdS)�TestHashingzUsed as a mixin for TestCasecCs"x�|jD]�\}}y3t|�t|�ksH|jd||f�Wq
tk
r�}z|jd|||f�WYdd}~Xq
Xq
Wx�|jD]�\}}y3t|�t|�kr�|jd||f�Wq�tk
r}z|jd|||f�WYdd}~Xq�Xq�WdS)Nz%r and %r do not hash equalzProblem hashing %r and %r: %sz#%s and %s hash equal, but shouldn'tzProblem hashing %s and %s: %s)r�hashZfail�	Exceptionr
)rrr�errr�	test_hashs1	zTestHashing.test_hashN)rr
rrrrrrrrsrcs�eZdZ�fdd�Z�fdd�Z�fdd�Z�fdd�Z�fd	d
�Z�fdd�Z�fd
d�Z	�fdd�Z
�fdd�Z�fdd�Z�fdd�Z
�S)�_BaseLoggingResultcs||_t�j�dS)N)�_events�super�__init__)r�log)�	__class__rrr)s	z_BaseLoggingResult.__init__cs$|jjd�t�j|�dS)N�	startTest)r�appendrr)r�test)rrrr-sz_BaseLoggingResult.startTestcs!|jjd�t�j�dS)N�startTestRun)rrrr)r)rrrr1sz_BaseLoggingResult.startTestRuncs$|jjd�t�j|�dS)N�stopTest)rrrr)rr)rrrr5sz_BaseLoggingResult.stopTestcs!|jjd�t�j�dS)N�stopTestRun)rrrr )r)rrrr 9sz_BaseLoggingResult.stopTestRuncs$|jjd�t�j|�dS)N�
addFailure)rrrr!)r�args)rrrr!=sz_BaseLoggingResult.addFailurecs$|jjd�t�j|�dS)N�
addSuccess)rrrr#)rr")rrrr#Asz_BaseLoggingResult.addSuccesscs$|jjd�t�j|�dS)N�addError)rrrr$)rr")rrrr$Esz_BaseLoggingResult.addErrorcs$|jjd�t�j|�dS)N�addSkip)rrrr%)rr")rrrr%Isz_BaseLoggingResult.addSkipcs$|jjd�t�j|�dS)N�addExpectedFailure)rrrr&)rr")rrrr&Msz%_BaseLoggingResult.addExpectedFailurecs$|jjd�t�j|�dS)N�addUnexpectedSuccess)rrrr')rr")rrrr'Qsz'_BaseLoggingResult.addUnexpectedSuccess)rr
rrrrrr r!r#r$r%r&r'rr)rrr(src@s(eZdZdZedd��ZdS)�LegacyLoggingResultzo
    A legacy TestResult implementation, without an addSubTest method,
    which records its method calls.
    cCs
t�dS)N)�AttributeError)rrrr�
addSubTest\szLegacyLoggingResult.addSubTestN)rr
rr�propertyr*rrrrr(Vsr(cs(eZdZdZ�fdd�Z�S)�
LoggingResultzE
    A TestResult implementation which records its method calls.
    csI|dkr|jjd�n|jjd�t�j|||�dS)NZaddSubTestSuccessZaddSubTestFailure)rrrr*)rrZsubtest�err)rrrr*fszLoggingResult.addSubTest)rr
rrr*rr)rrr,asr,c@sjeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�#ResultWithNoStartTestRunStopTestRunz?An object honouring TestResult before startTestRun/stopTestRun.cCsCg|_g|_d|_g|_g|_g|_d|_dS)NrF)Zfailures�errorsZtestsRunZskippedZexpectedFailuresZunexpectedSuccessesZ
shouldStop)rrrrrqs						z,ResultWithNoStartTestRunStopTestRun.__init__cCsdS)Nr)rrrrrrzsz-ResultWithNoStartTestRunStopTestRun.startTestcCsdS)Nr)rrrrrr}sz,ResultWithNoStartTestRunStopTestRun.stopTestcCsdS)Nr)rrrrrr$�sz,ResultWithNoStartTestRunStopTestRun.addErrorcCsdS)Nr)rrrrrr!�sz.ResultWithNoStartTestRunStopTestRun.addFailurecCsdS)Nr)rrrrrr#�sz.ResultWithNoStartTestRunStopTestRun.addSuccesscCsdS)NTr)rrrr�
wasSuccessful�sz1ResultWithNoStartTestRunStopTestRun.wasSuccessfulN)rr
rrrrrr$r!r#r0rrrrr.ns	r.)	Zunittest�objectrrZ
TestResultrr(r,r.rrrr�<module>s.