Ñò â÷Gc@sƒdZddkZddklZddklZddklZlZ ei dƒZ d„Z defd „ƒYZ d „ZdS( sê Test Result ----------- Provides a TextTestResult that extends unittest._TextTestResult to provide support for error classes (such as the builtin skip and deprecated classes), and hooks for plugins to take over or extend reporting. iÿÿÿÿN(t_TextTestResult(tConfig(tisclasstlns nose.resultcCs*yt|ƒSWndt|ƒiSXdS(Ns(tstrttypet__name__(texc((s//usr/lib/python2.6/site-packages/nose/result.pyt_exception_detailstTextTestResultcBsVeZdZddd„Zd„Zd„Zd„Zd„Zd„Z dd„Z RS( sÄText test result that extends unittest's default test result support for a configurable set of errorClasses (eg, Skip, Deprecated, TODO) that extend the errors/failures/success triad. cCs]|djo h}n||_|djo tƒ}n||_ti||||ƒdS(N(tNonet errorClassesRtconfigRt__init__(tselftstreamt descriptionst verbosityR R ((s//usr/lib/python2.6/site-packages/nose/result.pyR s      cCs£t|ddƒ}|\}}}y|i||ƒ}Wn"tj o|i|ƒ}nXxà|iiƒD]Ï\}\} } } t|ƒo­t||ƒo| i||fƒ|dj ox|i oK| g} t |dƒ} | o| i| ƒn|i di | ƒƒq6|i o|i| d ƒq6ndSqlW|ii||fƒ|dj o=|i o|ii dƒqŸ|i o|idƒqŸndS(s»Overrides normal addError to add support for errorClasses. If the exception is a registered class, the error will be added to the list for that class, not errors. Ris: NtERRORtE(tgetattrR t_exc_info_to_stringt TypeErrorR titemsRt issubclasstappendtshowAllRtwritelntjointdotstwriteterrorsR(RttestterrRtectevttbtexc_infotclststoragetlabeltisfailtmessagetdetail((s//usr/lib/python2.6/site-packages/nose/result.pytaddError*s4        cCs†ti|ƒxH|iiƒD]7}|i|\}}}|o|i||ƒqqWt|dƒo|iii|i ƒndS(s<Overrides to print all errorClasses errors as well. R N( Rt printErrorsR tkeystprintErrorListthasattrR tpluginstreportR(RR&R'R(R)((s//usr/lib/python2.6/site-packages/nose/result.pyR-Ks c CsÑ|ii}|ii}t||ƒ}|i}|djodpd}||iƒ|d|||fƒ|ƒh}|iiƒ} | iƒxH| D]@} |i| \} } } t | ƒ}|pqœn||| s cCs‘y|i||ƒ}Wn"tj o|i|ƒ}nX|ii||fƒ|io|iidƒn|io|iidƒndS(NRR(RRRRRRRR(RR R!R%((s//usr/lib/python2.6/site-packages/nose/result.pyt _addErrors  cCs>yti|||ƒSWn tj oti||ƒSXdS(N(RRR(RR!R ((s//usr/lib/python2.6/site-packages/nose/result.pyRœsN( Rt __module__t__doc__R R R,R-RHR>RKR(((s//usr/lib/python2.6/site-packages/nose/result.pyR s ! *  cOs*ddkl}|dtƒt||ŽS(Niÿÿÿÿ(twarns‚ln() has moved to nose.util from nose.result and will be removed from nose.result in a future release. Please update your imports (twarningsRNtDeprecationWarningt_ln(targtkwRN((s//usr/lib/python2.6/site-packages/nose/result.pyR¥s(RMtloggingtunittestRt nose.configRt nose.utilRRRQt getLoggertlogRR (((s//usr/lib/python2.6/site-packages/nose/result.pyt s  Š