관리-도구
편집 파일: proxy.cpython-38.pyc
U )�e� � @ 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� �8/opt/hc_python/lib/python3.8/site-packages/nose/proxy.py�fget s zproxied_attribute.<locals>.fgetc s t t| � ��|� d S r )�setattrr )r �valuer r r �fset s zproxied_attribute.<locals>.fsetc s t t| � ��� d S r )�delattrr r r r r �fdel! s zproxied_attribute.<locals>.fdel)�property)r r �docr r r r r r �proxied_attribute s r c @ s"