403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.139.237.30
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python37/lib/python3.7/site-packages/nose/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python37/lib/python3.7/site-packages/nose/__pycache__/proxy.cpython-37.pyc
B

�
U��@sNdZddlZddlmZe�e�Zdd�ZGdd�de�Z	Gdd	�d	e�Z
dS)
a�
Result Proxy
------------

The result proxy wraps the result instance given to each test. It
performs two functions: enabling extended error/failure reporting
and calling plugins.

As each result event is fired, plugins are called with the same event;
however, plugins are called with the nose.case.Test instance that
wraps the actual test. So when a test fails and calls
result.addFailure(self, err), the result proxy calls
addFailure(self.test, err) for each plugin. This allows plugins to
have a single stable interface for all test types, and also to
manipulate the test object itself by setting the `test` attribute of
the nose.case.Test that they receive.
�N)�Configcs8��fdd�}��fdd�}��fdd�}t||||�S)znCreate a property that proxies attribute ``proxied_attr`` through
    the local attribute ``local_attr``.
    cstt|����S)N)�getattr)�self)�
local_attr�proxied_attr��;/opt/alt/python37/lib/python3.7/site-packages/nose/proxy.py�fgetszproxied_attribute.<locals>.fgetcstt|���|�dS)N)�setattrr)r�value)rrrr�fsetszproxied_attribute.<locals>.fsetcstt|����dS)N)�delattrr)r)rrrr�fdel!szproxied_attribute.<locals>.fdel)�property)rr�docr	rrr)rrr�proxied_attributesrc@s"eZdZdZddd�Zdd�ZdS)�ResultProxyFactoryzrFactory for result proxies. Generates a ResultProxy bound to each test
    and the result passed to the test.
    NcCs$|dkrt�}||_d|_d|_dS)NF)r�config�_ResultProxyFactory__prepared�_ResultProxyFactory__result)rrrrr�__init__*s
zResultProxyFactory.__init__cCsL|js,d|_|jj�|�}|dk	r,||_}|jdk	r<|j}t|||jd�S)aReturn a ResultProxy for the current test.

        On first call, plugins are given a chance to replace the
        result used for the remaining tests. If a plugin returns a
        value from prepareTestResult, that object will be used as the
        result for all tests.
        TN)r)rr�pluginsZprepareTestResultr�ResultProxy)r�result�testZplug_resultrrr�__call__1s

zResultProxyFactory.__call__)N)�__name__�
__module__�__qualname__�__doc__rrrrrrr&s
rc@s�eZdZdZd&dd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zeddd�Zedd d!�Zedd"d#�Zedd$d%�ZdS)'ragProxy to TestResults (or other results handler).

    One ResultProxy is created for each nose.case.Test. The result
    proxy calls plugins with the nose.case.Test instance (instead of
    the wrapped test case) as each result call is made. Finally, the
    real result method is called, also with the nose.case.Test
    instance as the test parameter.

    NcCs,|dkrt�}||_|j|_||_||_dS)N)rrrrr)rrrrrrrrMszResultProxy.__init__cCs
t|j�S)N)�reprr)rrrr�__repr__UszResultProxy.__repr__cCsNt|dt�sJt|dt�rJt|djtfi�|d�}|d||df}|S)N�r�)�
isinstance�	Exception�typer)r�errrrrr�_prepareErrXszResultProxy._prepareErrcCsTt|jdd�}||jksP||ksP|t|dd�ksPtd|jt|j�|t|�f��dS)NrZ
_nose_casez4ResultProxy for %r (%s) was called with test %r (%s))rr�AssertionError�id)rr�caserrr�assertMyTestbs
zResultProxy.assertMyTestcCs6|�|�|j�|j�t|jd�r2|j�|j�dS)N�	afterTest)r,rr-r�hasattrr)rrrrrr-ms
zResultProxy.afterTestcCs6|�|�|j�|j�t|jd�r2|j�|j�dS)N�
beforeTest)r,rr/rr.r)rrrrrr/ss
zResultProxy.beforeTestcCs�|�|�|j}|�|j|�}|r&dS|�|j|�}|dk	r@|}|�|j|�|j�|j|�|��|j��s||j	j
r|d|_dS)NT)r,r�handleErrorrZformatError�addErrorrr(�
wasSuccessfulr�stopOnError�
shouldStop)rrr'r�plugin_handled�	formattedrrrr1ys
zResultProxy.addErrorcCs~|�|�|j}|�|j|�}|r&dSd|j_|�|j|�}|dk	rH|}|�|j|�|j�|j|�|��|j	j
rzd|_dS)NFT)r,rZ
handleFailurerZpassedZ
formatFailure�
addFailurerr(rr3r4)rrr'rr5r6rrrr7�s
zResultProxy.addFailurecCsVddlm}|�|�|j}t|t�s.t|�}|�|j||df�|j�	|j|�dS)Nr)�SkipTest)
Znose.plugins.skipr8r,rr$r%r1rr�addSkip)rr�reasonr8rrrrr9�s

zResultProxy.addSkipcCs*|�|�|j�|j�|j�|j�dS)N)r,r�
addSuccessrr)rrrrrr;�s
zResultProxy.addSuccesscCs*|�|�|j�|j�|j�|j�dS)N)r,r�	startTestrr)rrrrrr<�s
zResultProxy.startTestcCs|j��dS)N)r�stop)rrrrr=�szResultProxy.stopcCs*|�|�|j�|j�|j�|j�dS)N)r,r�stopTestrr)rrrrrr>�s
zResultProxy.stopTestrr4zShould the test run stop?�errorszTests that raised an exception�failureszTests that failed�testsRunzNumber of tests run)N)rrrrrr!r(r,r-r/r1r7r9r;r<r=r>rr4r?r@rArrrrrCs,	

r)r�loggingZnose.configr�	getLoggerr�logr�objectrrrrrr�<module>s



Youez - 2016 - github.com/yon3zu
LinuXploit