Psyduck - 可達鴨 之 鴨力山大2


Server : LiteSpeed
System : Linux premium217.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : alloknri ( 880)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /opt/alt/python34/lib64/python3.4/unittest/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python34/lib64/python3.4/unittest/__pycache__/result.cpython-34.pyo
�
j f��@s�dZddlZddlZddlZddlmZddlmZdZdd�Z	d	Z
d
ZGdd�de�Z
dS)
zTest result object�N�)�util)�wrapsTcs"t���fdd��}|S)Ncs/t|dd�r|j�n�|||�S)N�failfastF)�getattr�stop)�self�args�kw)�method��4/opt/alt/python34/lib64/python3.4/unittest/result.py�inner
s
zfailfast.<locals>.inner)r)rrr)rr
rsrz
Stdout:
%sz
Stderr:
%sc@s?eZdZdZdZdZdZddddd�Zdd�Zdd	�Z	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zedd��Zedd��Zdd�Zdd�Zdd�Zdd�Zed d!��Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�ZdS).�
TestResulta�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.
    NFcCs�d|_g|_g|_d|_g|_g|_g|_d|_d|_d|_	d|_
tj|_
tj|_d|_dS)NFr)r�failures�errors�testsRun�skipped�expectedFailures�unexpectedSuccesses�
shouldStop�buffer�_stdout_buffer�_stderr_buffer�sys�stdout�_original_stdout�stderr�_original_stderr�
_mirrorOutput)r�streamZdescriptions�	verbosityrrr
�__init__&s											zTestResult.__init__cCsdS)z#Called by TestRunner after test runNr)rrrr
�printErrors6szTestResult.printErrorscCs&|jd7_d|_|j�dS)z-Called when the given test is about to be runrFN)rr�_setupStdout)r�testrrr
�	startTest9s	zTestResult.startTestcCsX|jrT|jdkr9tj�|_tj�|_n|jt_|jt_ndS)N)rr�io�StringIOrrrr)rrrr
r$?s	zTestResult._setupStdoutcCsdS)zpCalled once before any tests are executed.

        See startTest for a method called before each test.
        Nr)rrrr
�startTestRunGszTestResult.startTestRuncCs|j�d|_dS)z'Called when the given test has been runFN)�_restoreStdoutr)rr%rrr
�stopTestMs
zTestResult.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)N�
r)rrrr�getvaluer�endswithr�write�STDOUT_LINEr�STDERR_LINEr�seek�truncater)r�output�errorrrr
r*Rs$		


zTestResult._restoreStdoutcCsdS)zmCalled once after all tests are executed.

        See stopTest for a method called after each test.
        Nr)rrrr
�stopTestRungszTestResult.stopTestRuncCs/|jj||j||�f�d|_dS)zmCalled when an error has occurred. 'err' is a tuple of values as
        returned by sys.exc_info().
        TN)r�append�_exc_info_to_stringr)rr%�errrrr
�addErrorms"zTestResult.addErrorcCs/|jj||j||�f�d|_dS)zdCalled when an error has occurred. 'err' is a tuple of values as
        returned by sys.exc_info().TN)rr7r8r)rr%r9rrr
�
addFailureus"zTestResult.addFailurecCs�|dk	r�t|dd�r+|j�nt|d|j�rM|j}n	|j}|j||j||�f�d|_ndS)z�Called at the end of a subtest.
        'err' is None if the subtest ended successfully, otherwise it's a
        tuple of values as returned by sys.exc_info().
        NrFrT)	rr�
issubclass�failureExceptionrrr7r8r)rr%Zsubtestr9rrrr
�
addSubTest|s
	zTestResult.addSubTestcCsdS)z-Called when a test has completed successfullyNr)rr%rrr
�
addSuccess�szTestResult.addSuccesscCs|jj||f�dS)zCalled when a test is skipped.N)rr7)rr%�reasonrrr
�addSkip�szTestResult.addSkipcCs&|jj||j||�f�dS)z.Called when an expected failure/error occured.N)rr7r8)rr%r9rrr
�addExpectedFailure�s	zTestResult.addExpectedFailurecCs|jj|�dS)z5Called when a test was expected to fail, but succeed.N)rr7)rr%rrr
�addUnexpectedSuccess�szTestResult.addUnexpectedSuccesscCsQt|j�t|j�ko)dknoPt|d�pPt|j�dkS)z/Tells whether or not this result was a success.rr)�lenrr�hasattrr)rrrr
�
wasSuccessful�s.zTestResult.wasSuccessfulcCs
d|_dS)z+Indicates that the tests should be aborted.TN)r)rrrr
r�szTestResult.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)z>Converts a sys.exc_info()-style tuple of values into a string.r,�)�_is_relevant_tb_level�tb_nextr=�_count_relevant_tb_levels�	traceback�format_exceptionrrrr-rr.r7r0r1�join)
rr9r%�exctype�value�tb�lengthZmsgLinesr4r5rrr
r8�s&
	

zTestResult._exc_info_to_stringcCsd|jjkS)N�
__unittest)�tb_frame�	f_globals)rrPrrr
rH�sz TestResult._is_relevant_tb_levelcCs:d}x-|r5|j|�r5|d7}|j}q	W|S)Nrr)rHrI)rrPrQrrr
rJ�s


z$TestResult._count_relevant_tb_levelscCs5dtj|j�|jt|j�t|j�fS)Nz!<%s run=%i errors=%i failures=%i>)rZstrclass�	__class__rrDrr)rrrr
�__repr__�s!zTestResult.__repr__)�__name__�
__module__�__qualname__�__doc__Z_previousTestClassZ_testRunEnteredZ_moduleSetUpFailedr"r#r&r$r)r+r*r6rr:r;r>r?rArBrCrFrr8rHrJrVrrrr
rs2
	r)rZr'rrKrGr�	functoolsrrRrr0r1�objectrrrrr
�<module>s
Name
Size
Permissions
Options
__init__.cpython-34.pyc
2.838 KB
-rw-r--r--
__init__.cpython-34.pyo
2.838 KB
-rw-r--r--
__main__.cpython-34.pyc
0.456 KB
-rw-r--r--
__main__.cpython-34.pyo
0.456 KB
-rw-r--r--
case.cpython-34.pyc
49.984 KB
-rw-r--r--
case.cpython-34.pyo
49.926 KB
-rw-r--r--
loader.cpython-34.pyc
12.481 KB
-rw-r--r--
loader.cpython-34.pyo
12.356 KB
-rw-r--r--
main.cpython-34.pyc
7.311 KB
-rw-r--r--
main.cpython-34.pyo
7.311 KB
-rw-r--r--
mock.cpython-34.pyc
63.509 KB
-rw-r--r--
mock.cpython-34.pyo
63.509 KB
-rw-r--r--
result.cpython-34.pyc
7.548 KB
-rw-r--r--
result.cpython-34.pyo
7.548 KB
-rw-r--r--
runner.cpython-34.pyc
7.212 KB
-rw-r--r--
runner.cpython-34.pyo
7.212 KB
-rw-r--r--
signals.cpython-34.pyc
2.336 KB
-rw-r--r--
signals.cpython-34.pyo
2.336 KB
-rw-r--r--
suite.cpython-34.pyc
9.745 KB
-rw-r--r--
suite.cpython-34.pyo
9.745 KB
-rw-r--r--
util.cpython-34.pyc
5.127 KB
-rw-r--r--
util.cpython-34.pyo
5.05 KB
-rw-r--r--