AlkantarClanX12

Your IP : 3.145.163.138


Current Path : /proc/thread-self/root/opt/alt/python33/lib64/python3.3/unittest/__pycache__/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python33/lib64/python3.3/unittest/__pycache__/result.cpython-33.pyc

�
��f�c@s�dZddlZddlZddlZddlmZddlmZdZ	dd�Z
dZd	ZGd
d�de
�ZdS(
uTest result objectiNi(uutil(uwrapscs"t���fdd��}|S(Ncs/t|dd�r|j�n�|||�S(NufailfastF(ugetattruFalseustop(uselfuargsukw(umethod(u4/opt/alt/python33/lib64/python3.3/unittest/result.pyuinner
s
ufailfast.<locals>.inner(uwraps(umethoduinner((umethodu4/opt/alt/python33/lib64/python3.3/unittest/result.pyufailfastsufailfastu
Stdout:
%su
Stderr:
%scBs7|EeZdZdZd*Zd+Zd+Zd*d*d*dd�Z	dd�Z
dd�Zdd	�Zd
d�Z
dd
�Zdd�Zdd�Zedd��Zedd��Zdd�Zdd�Zdd�Zedd��Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*S(,u
TestResultu�Holder for test result information.

    Test results are automatically managed by the TestCase and TestSuite
    classes, and do not need to be explicitly manipulated by writers of tests.

    Each instance holds the total number of tests run, and collections of
    failures and errors that occurred among those test runs. The collections
    contain tuples of (testcase, exceptioninfo), where exceptioninfo is the
    formatted traceback of the error that occurred.
    cCs�d|_g|_g|_d|_g|_g|_g|_d|_d|_	d|_d|_t
j|_t
j|_d|_dS(NiF(uFalseufailfastufailuresuerrorsutestsRunuskippeduexpectedFailuresuunexpectedSuccessesu
shouldStopubufferuNoneu_stdout_bufferu_stderr_bufferusysustdoutu_original_stdoutustderru_original_stderru
_mirrorOutput(uselfustreamudescriptionsu	verbosity((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu__init__&s											uTestResult.__init__cCsdS(u#Called by TestRunner after test runN((uself((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyuprintErrors6suTestResult.printErrorscCs&|jd7_d|_|j�dS(u-Called when the given test is about to be runiNF(utestsRunuFalseu
_mirrorOutputu_setupStdout(uselfutest((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu	startTest9s	uTestResult.startTestcCsX|jrT|jdkr9tj�|_tj�|_n|jt_|jt_ndS(N(	ubufferu_stderr_bufferuNoneuiouStringIOu_stdout_bufferusysustdoutustderr(uself((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu_setupStdout?s	uTestResult._setupStdoutcCsdS(upCalled once before any tests are executed.

        See startTest for a method called before each test.
        N((uself((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyustartTestRunGsuTestResult.startTestRuncCs|j�d|_dS(u'Called when the given test has been runNF(u_restoreStdoutuFalseu
_mirrorOutput(uselfutest((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyustopTestMs
uTestResult.stopTestcCs�|jr�|jr�tjj�}tjj�}|ri|jd�sR|d7}n|jjt	|�n|r�|jd�s�|d7}n|j
jt|�q�n|jt_|j
t_|jj
d�|jj�|jj
d�|jj�ndS(Nu
i(ubufferu
_mirrorOutputusysustdoutugetvalueustderruendswithu_original_stdoutuwriteuSTDOUT_LINEu_original_stderruSTDERR_LINEu_stdout_bufferuseekutruncateu_stderr_buffer(uselfuoutputuerror((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu_restoreStdoutRs$		


uTestResult._restoreStdoutcCsdS(umCalled once after all tests are executed.

        See stopTest for a method called after each test.
        N((uself((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyustopTestRungsuTestResult.stopTestRuncCs/|jj||j||�f�d|_dS(umCalled when an error has occurred. 'err' is a tuple of values as
        returned by sys.exc_info().
        NT(uerrorsuappendu_exc_info_to_stringuTrueu
_mirrorOutput(uselfutestuerr((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyuaddErrorms"uTestResult.addErrorcCs/|jj||j||�f�d|_dS(udCalled when an error has occurred. 'err' is a tuple of values as
        returned by sys.exc_info().NT(ufailuresuappendu_exc_info_to_stringuTrueu
_mirrorOutput(uselfutestuerr((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu
addFailureus"uTestResult.addFailurecCsdS(u-Called when a test has completed successfullyN((uselfutest((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu
addSuccess|suTestResult.addSuccesscCs|jj||f�dS(uCalled when a test is skipped.N(uskippeduappend(uselfutestureason((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyuaddSkip�suTestResult.addSkipcCs&|jj||j||�f�dS(u.Called when an expected failure/error occured.N(uexpectedFailuresuappendu_exc_info_to_string(uselfutestuerr((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyuaddExpectedFailure�s	uTestResult.addExpectedFailurecCs|jj|�dS(u5Called when a test was expected to fail, but succeed.N(uunexpectedSuccessesuappend(uselfutest((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyuaddUnexpectedSuccess�suTestResult.addUnexpectedSuccesscCs*t|j�t|j�ko'dkSS(u.Tells whether or not this result was a successi(ulenufailuresuerrors(uself((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu
wasSuccessful�suTestResult.wasSuccessfulcCs
d|_dS(u*Indicates that the tests should be abortedNT(uTrueu
shouldStop(uself((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyustop�suTestResult.stopc
Cs%|\}}}x"|r3|j|�r3|j}qW||jkrm|j|�}tj||||�}ntj|||�}|jrtjj	�}tj
j	�}	|r�|jd�s�|d7}n|jt
|�n|	r|	jd�s|	d7}	n|jt|	�qndj|�S(u>Converts a sys.exc_info()-style tuple of values into a string.u
u(u_is_relevant_tb_levelutb_nextufailureExceptionu_count_relevant_tb_levelsu	tracebackuformat_exceptionubufferusysustdoutugetvalueustderruendswithuappenduSTDOUT_LINEuSTDERR_LINEujoin(
uselfuerrutestuexctypeuvalueutbulengthumsgLinesuoutputuerror((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu_exc_info_to_string�s&
	

uTestResult._exc_info_to_stringcCsd|jjkS(Nu
__unittest(utb_frameu	f_globals(uselfutb((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu_is_relevant_tb_level�su TestResult._is_relevant_tb_levelcCs:d}x-|r5|j|�r5|d7}|j}q	W|S(Nii(u_is_relevant_tb_levelutb_next(uselfutbulength((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu_count_relevant_tb_levels�s


u$TestResult._count_relevant_tb_levelscCs5dtj|j�|jt|j�t|j�fS(Nu!<%s run=%i errors=%i failures=%i>(uutilustrclassu	__class__utestsRunulenuerrorsufailures(uself((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu__repr__�s!uTestResult.__repr__NF(u__name__u
__module__u__qualname__u__doc__uNoneu_previousTestClassuFalseu_testRunEnteredu_moduleSetUpFailedu__init__uprintErrorsu	startTestu_setupStdoutustartTestRunustopTestu_restoreStdoutustopTestRunufailfastuaddErroru
addFailureu
addSuccessuaddSkipuaddExpectedFailureuaddUnexpectedSuccessu
wasSuccessfulustopu_exc_info_to_stringu_is_relevant_tb_levelu_count_relevant_tb_levelsu__repr__(u
__locals__((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu
TestResults0
u
TestResultT(u__doc__uiousysu	tracebackuuutilu	functoolsuwrapsuTrueu
__unittestufailfastuSTDOUT_LINEuSTDERR_LINEuobjectu
TestResult(((u4/opt/alt/python33/lib64/python3.3/unittest/result.pyu<module>s