ó J9•Qc@s@dZddlmZddlmZdefd„ƒYZdS(s0 This plugin provides assert introspection. When the plugin is enabled and a test failure occurs, the traceback is displayed with extra context around the line in which the exception was raised. Simple variable substitution is also performed in the context output to provide more debugging information. iÿÿÿÿ(tPlugin(tinspect_tracebackt FailureDetailcBs/eZdZdZd„Zd„Zd„ZRS(sP Plugin that provides extra information in tracebacks of test failures. i@c Cs8|jdddddd|jdƒdd d d ƒd S( s'Register commmandline options. s-ds--detailed-errorss--failure-detailtactiont store_truetdefaulttNOSE_DETAILED_ERRORStdesttdetailedErrorsthelpsZAdd detail to error output by attempting to evaluate failed asserts [NOSE_DETAILED_ERRORS]N(t add_optiontget(tselftparsertenv((s>/sys/lib/python2.7/site-packages/nose/plugins/failuredetail.pytoptionss  cCs&|js dS|j|_||_dS(sConfigure plugin. N(t can_configureRtenabledtconf(R RR((s>/sys/lib/python2.7/site-packages/nose/plugins/failuredetail.pyt configures  cCsh|\}}}dt|ƒ}}|rRt|ƒ}djt|ƒ|gƒ}n||_|||fS(sLAdd detail from traceback inspection to error message of a failure. s N(tNonetstrRtjointtbinfo(R ttestterrtectevttbRtstr_ev((s>/sys/lib/python2.7/site-packages/nose/plugins/failuredetail.pyt formatFailure%s  (t__name__t __module__t__doc__tscoreRRR(((s>/sys/lib/python2.7/site-packages/nose/plugins/failuredetail.pyR s  N(R!t nose.pluginsRtnose.inspectorRR(((s>/sys/lib/python2.7/site-packages/nose/plugins/failuredetail.pyts