/usr/lib/python2.6/site-packages/nose
Edit: /usr/lib/python2.6/site-packages/nose/proxy.pyc (7327B)
Ñò
(bæGc @ sj d Z d d k Z d d k l Z e i e Z d Z d e f d YZ d e f d YZ
d S( s
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.
iÿÿÿÿN( t Configc sI f d } f d } f d } t | | | | S( sn Create a property that proxies attribute ``proxied_attr`` through
the local attribute ``local_attr``.
c s t t | S( N( t getattr( t self( t proxied_attrt
local_attr( s. /usr/lib/python2.6/site-packages/nose/proxy.pyt fget s c s t t | | d S( N( t setattrR ( R t value( R R ( s. /usr/lib/python2.6/site-packages/nose/proxy.pyt fset s c s t t | d S( N( t delattrR ( R ( R R ( s. /usr/lib/python2.6/site-packages/nose/proxy.pyt fdel! s ( t property( R R t docR R R
( ( R R s. /usr/lib/python2.6/site-packages/nose/proxy.pyt proxied_attribute s t ResultProxyFactoryc B s# e Z d Z d d Z d Z RS( sr Factory for result proxies. Generates a ResultProxy bound to each test
and the result passed to the test.
c C s9 | d j o
t } n | | _ t | _ d | _ d S( N( t NoneR t configt Falset _ResultProxyFactory__preparedt _ResultProxyFactory__result( R R ( ( s. /usr/lib/python2.6/site-packages/nose/proxy.pyt __init__* s
c C s} | i p@ t | _ | i i i | } | d j o | | _ } qJ n | i d j o
| i } n t | | d | i S( s 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.
R N( R t TrueR t pluginst prepareTestResultR R t ResultProxy( R t resultt testt plug_result( ( s. /usr/lib/python2.6/site-packages/nose/proxy.pyt __call__1 s
N( t __name__t
__module__t __doc__R R R ( ( ( s. /usr/lib/python2.6/site-packages/nose/proxy.pyR &