File: //opt/alt/python37/lib/python3.7/site-packages/nose/__pycache__/proxy.cpython-37.opt-1.pyc
B
�
U� � @ sN d Z ddlZddlmZ e�e�Zdd� ZG dd� de�Z G dd � 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)�Configc s8 � �fdd�}� �fdd�}� �fdd�}t ||||�S )znCreate a property that proxies attribute ``proxied_attr`` through
the local attribute ``local_attr``.
c s t t | � ���S )N)�getattr)�self)�
local_attr�proxied_attr� �;/opt/alt/python37/lib/python3.7/site-packages/nose/proxy.py�fget s zproxied_attribute.<locals>.fgetc s t t| � ��|� d S )N)�setattrr )r �value)r r r r �fset s zproxied_attribute.<locals>.fsetc s t t| � ��� d S )N)�delattrr )r )r r r r �fdel! s zproxied_attribute.<locals>.fdel)�property)r r �docr r r r )r r r �proxied_attribute s r c @ s"