Ñò (bæGc@sjdZddkZddklZeieƒZd„Zdefd„ƒYZ defd„ƒYZ dS( 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(tConfigcsI‡‡fd†}‡‡fd†}‡‡fd†}t||||ƒS(snCreate a property that proxies attribute ``proxied_attr`` through the local attribute ``local_attr``. cstt|ˆƒˆƒS(N(tgetattr(tself(t proxied_attrt local_attr(s./usr/lib/python2.6/site-packages/nose/proxy.pytfgetscstt|ˆƒˆ|ƒdS(N(tsetattrR(Rtvalue(RR(s./usr/lib/python2.6/site-packages/nose/proxy.pytfsetscstt|ˆƒˆƒdS(N(tdelattrR(R(RR(s./usr/lib/python2.6/site-packages/nose/proxy.pytfdel!s(tproperty(RRtdocRRR ((RRs./usr/lib/python2.6/site-packages/nose/proxy.pytproxied_attributestResultProxyFactorycBs#eZdZdd„Zd„ZRS(srFactory for result proxies. Generates a ResultProxy bound to each test and the result passed to the test. cCs9|djo tƒ}n||_t|_d|_dS(N(tNoneRtconfigtFalset_ResultProxyFactory__preparedt_ResultProxyFactory__result(RR((s./usr/lib/python2.6/site-packages/nose/proxy.pyt__init__*s     cCs}|ip@t|_|iii|ƒ}|dj o||_}qJn|idj o |i}nt||d|iƒS(sReturn 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. RN(RtTrueRtpluginstprepareTestResultRRt ResultProxy(Rtresultttestt plug_result((s./usr/lib/python2.6/site-packages/nose/proxy.pyt__call__1s    N(t__name__t __module__t__doc__RRR(((s./usr/lib/python2.6/site-packages/nose/proxy.pyR&s RcBsŒeZdZdd„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zed d dƒZed ddƒZed ddƒZed ddƒZRS(skProxy 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. cCsE|djo tƒ}n||_|i|_||_||_dS(N(RRRRRR(RRRR((s./usr/lib/python2.6/site-packages/nose/proxy.pyRMs      cCs t|iƒS(N(treprR(R((s./usr/lib/python2.6/site-packages/nose/proxy.pyt__repr__UscCst|iddƒ}dS(NR(RRR(RRtcase((s./usr/lib/python2.6/site-packages/nose/proxy.pyt assertMyTestXscCsN|i|ƒ|ii|iƒt|idƒo|ii|iƒndS(Nt afterTest(R#RR$RthasattrR(RR((s./usr/lib/python2.6/site-packages/nose/proxy.pyR$cs cCsN|i|ƒ|ii|iƒt|idƒo|ii|iƒndS(Nt beforeTest(R#RR&RR%R(RR((s./usr/lib/python2.6/site-packages/nose/proxy.pyR&is cCs»|i|ƒ|i}|i|i|ƒ}|odS|i|i|ƒ}|dj o |}n|i|i|ƒ|ii|i|ƒ|iiƒ o|i i o t |_ ndS(N( R#Rt handleErrorRt formatErrorRtaddErrorRt wasSuccessfulRt stopOnErrorRt shouldStop(RRterrRtplugin_handledt formatted((s./usr/lib/python2.6/site-packages/nose/proxy.pyR)os    cCsª|i|ƒ|i}|i|i|ƒ}|odS|i|i|ƒ}|dj o |}n|i|i|ƒ|ii|i|ƒ|ii o t |_ ndS(N( R#Rt handleFailureRt formatFailureRt addFailureRRR+RR,(RRR-RR.R/((s./usr/lib/python2.6/site-packages/nose/proxy.pyR2}s     cCs7|i|ƒ|ii|iƒ|ii|iƒdS(N(R#Rt addSuccessRR(RR((s./usr/lib/python2.6/site-packages/nose/proxy.pyR3‹s cCs7|i|ƒ|ii|iƒ|ii|iƒdS(N(R#Rt startTestRR(RR((s./usr/lib/python2.6/site-packages/nose/proxy.pyR4s cCs|iiƒdS(N(Rtstop(R((s./usr/lib/python2.6/site-packages/nose/proxy.pyR5•scCs7|i|ƒ|ii|iƒ|ii|iƒdS(N(R#RtstopTestRR(RR((s./usr/lib/python2.6/site-packages/nose/proxy.pyR6˜s RR,sShould the test run stop?terrorssTests that raised an exceptiontfailuressTests that failedttestsRunsNumber of tests runN(RRRRRR!R#R$R&R)R2R3R4R5R6R R,R7R8R9(((s./usr/lib/python2.6/site-packages/nose/proxy.pyRCs(                  ( Rtloggingt nose.configRt getLoggerRtlogR tobjectRR(((s./usr/lib/python2.6/site-packages/nose/proxy.pyts