shell bypass 403
�
v��g� � �r � d Z ddlZddlmZ ej e� Zd� Z G d� de� Z G d� de� Z
y) 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)�Configc �F � �� � �fd�}� �fd�}� �fd�}t ||||� S )znCreate a property that proxies attribute ``proxied_attr`` through
the local attribute ``local_attr``.
c �0 �� t t | �� �� S �N)�getattr��self�
local_attr�proxied_attrs ���9/opt/hc_python/lib/python3.12/site-packages/nose/proxy.py�fgetzproxied_attribute.<locals>.fget s �� ��w�t�Z�0�,�?�?� c �4 �� t t | �� �|� y r )�setattrr )r �valuer
r s ��r �fsetzproxied_attribute.<locals>.fset s �� ����j�)�<��?r c �2 �� t t | �� �� y r )�delattrr r s ��r �fdelzproxied_attribute.<locals>.fdel! s �� ����j�)�<�8r )�property)r
r �docr
r r s `` r �proxied_attributer s% �� �@�@�9��D�$��c�*�*r c � � e Zd ZdZdd�Zd� Zy)�ResultProxyFactoryzrFactory for result proxies. Generates a ResultProxy bound to each test
and the result passed to the test.
Nc �F � |�
t � }|| _ d| _ d | _ y )NF)r �config�_ResultProxyFactory__prepared�_ResultProxyFactory__result)r r s r �__init__zResultProxyFactory.__init__* s# � ��>��X�F���������
r c �� � | j s7d| _ | j j j |� }|� |x| _ }| j �| j }t ||| j �� S )a Return 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.
T)r )r r �plugins�prepareTestResultr �ResultProxy)r �result�test�plug_results r �__call__zResultProxyFactory.__call__1 sd � � ���"�D�O��+�+�-�-�?�?��G�K��&�)4�4��
���=�=�$��]�]�F��6�4����<�<r r )�__name__�
__module__�__qualname__�__doc__r r'