Your IP : 216.73.216.213


Current Path : /opt/alt/python34/lib64/python3.4/unittest/test/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/unittest/test/__pycache__/support.cpython-34.pyo

�
j f �@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/python34/lib64/python3.4/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 TestCasecCsPx�|jD]�\}}y6t|�t|�ksK|jd||f�nWq
tk
rc�Yq
tk
r�}z|jd|||f�WYdd}~Xq
Xq
Wx�|jD]�\}}y6t|�t|�kr�|jd||f�nWq�tk
r	�Yq�tk
rG}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�KeyboardInterrupt�	Exceptionr
)rrr�errr�	test_hashs"
1	
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)rrrr1sz_BaseLoggingResult.startTestcs!|jjd�t�j�dS)N�startTestRun)rrrr)r)rrrr5sz_BaseLoggingResult.startTestRuncs$|jjd�t�j|�dS)N�stopTest)rrrr )rr)rrrr 9sz_BaseLoggingResult.stopTestcs!|jjd�t�j�dS)N�stopTestRun)rrrr!)r)rrrr!=sz_BaseLoggingResult.stopTestRuncs$|jjd�t�j|�dS)N�
addFailure)rrrr")r�args)rrrr"Asz_BaseLoggingResult.addFailurecs$|jjd�t�j|�dS)N�
addSuccess)rrrr$)rr#)rrrr$Esz_BaseLoggingResult.addSuccesscs$|jjd�t�j|�dS)N�addError)rrrr%)rr#)rrrr%Isz_BaseLoggingResult.addErrorcs$|jjd�t�j|�dS)N�addSkip)rrrr&)rr#)rrrr&Msz_BaseLoggingResult.addSkipcs$|jjd�t�j|�dS)N�addExpectedFailure)rrrr')rr#)rrrr'Qsz%_BaseLoggingResult.addExpectedFailurecs$|jjd�t�j|�dS)N�addUnexpectedSuccess)rrrr()rr#)rrrr(Usz'_BaseLoggingResult.addUnexpectedSuccess)rr
rrrrr r!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)Zs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+jszLoggingResult.addSubTest)rr
rrr+rr)rrr-es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)rrrrrus						z,ResultWithNoStartTestRunStopTestRun.__init__cCsdS)Nr)rrrrrr~sz-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
rrrrr r%r"r$r1rrrrr/rs	r/)	Zunittest�objectrrZ
TestResultrr)r-r/rrrr�<module>s.