ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ 3Sc@sdZddlZddlZddlZddlmZddlmZddlm Z ddl m Z m Z m Z ejeZdgZdejfdYZd ejfd YZd efd YZd efdYZdS(snose unittest.TestCase subclasses. It is not necessary to subclass these classes when writing tests; they are used internally by nose.loader.TestLoader to create test cases from test functions and methods in test classes. iN(t isfunction(tConfig(tFailure(t resolve_namet test_addressttry_runtTestcBseZdZeZdddZdZdZdZ dZ dZ dZ dZ d Zd Zeeddd Zd Zd ZdZRS(sThe universal test case wrapper. When a plugin sees a test, it will always see an instance of this class. To access the actual test case that will be run, access the test property of the nose.case.Test instance. cCst|std|n||_|dkr@t}n||_d|_d|_||_|j |_ d|_ t j j |dS(NsTnose.case.Test called with argument %r that is not callable. A callable is required.(tcallablet TypeErrorttesttNoneRtconfigttbinfotcapturedOutputt resultProxytpluginstpassedtunittesttTestCaset__init__(tselfR R R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRs           cOs|j||S(N(trun(Rtargtkwarg((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyt__call__,scCs/|jj|}|dk r"|St|jS(N(RttestNameR tstrR (Rtname((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyt__str__/s cCs d|jS(NsTest(%r)(R (R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyt__repr__5scCs2y |j}Wntk r nX||jdS(s>Called after test is complete (after result.stopTest) N(t afterTesttAttributeErrorR (RtresultR((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR8s   cCs2y |j}Wntk r nX||jdS(s<Called before test is run (before result.startTest) N(t beforeTestRR (RR R!((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR!Bs   cCs"tj\}}}|||fS(s Extract exception info. (tsystexc_info(Rtexctexvttb((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR#LscCs |jjS(s0Get a short(er) description of the test (R tid(R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR'RscCs0t|jdr|jjSt|jSdS(sReturn a round-trip name for this test, a name that can be fed back as input to loadTestByName and (assuming the same plugin configuration) result in the loading of this test. taddressN(thasattrR R(R(R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR(Ws cCspy|jjSWntk r!nXy|jjSWntk rCnXyt|jjSWntk rknXdS(N(R tcontextRt __class__Rt __module__R (R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyt_contextbs   s-Get the context object of this test (if any).cCs|jr|j||}nz[y|j||j|Wn6tk rUn#tj}|j||nXWd|j|XdS(sModified run for the test wrapper. From here we don't call result.startTest or stopTest or addSuccess. The wrapper calls addError/addFailure only if its own setup or teardown fails, or running the wrapped test fails (eg, if the wrapped "test" is not callable). Two additional methods are called, beforeTest and afterTest. These give plugins a chance to modify the wrapped test before it is called and do cleanup after it is called. They are called unconditionally. N(RR!trunTesttKeyboardInterruptR"R#taddErrorR(RR terr((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRss    cCsA|j}|jjj|}|dk r3|}n||dS(sRun the test. Plugins may alter the test by returning a value from prepareTestCase. The value must be callable and must accept one argument, the result instance. N(R R RtprepareTestCaseR (RR R t plug_test((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR.s    cCs|jj|}|dk r"|S|j}y|jj|_Wn;tk r~y|jj|_Wqtk rzqXnXy|jj}Wnt k rnXy|t |jkrdSWnt k rnX|S(N( Rt describeTestR R t_testMethodDoctstripRt_TestCase__testMethodDoctshortDescriptiont ExceptionR(RtdescR ((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR8s*      N(t__name__R,t__doc__tFalset__test__R RRRRRR!R#R'R(R-tpropertyR*RR.R8(((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRs"          tTestBasecBs/eZdZeZdZdZdZRS(sBCommon functionality for FunctionTestCase and MethodTestCase. cCs t|S(N(R(R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR'scCs|j|jdS(N(R R(R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR.scCsrt|jdr|jjS|j\}}t|dd}|sUt|}n|jjddjS(Nt descriptionR<s i( R)R RAt _descriptorstgetattrR RR6tsplit(RtfuncRtdoc((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR8s (R;R,R<R=R>R'R.R8(((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR@s   tFunctionTestCasecBs}eZdZeZd d ed dZdZdZ e e d d dZ dZ dZ dZeZdZRS( sTestCase wrapper for test functions. Don't use this class directly; it is used internally in nose to create test cases for test functions. cCs>||_||_||_||_||_tj|dS(sInitialize the MethodTestCase. Required argument: * test -- the test function to call. Optional arguments: * setUp -- function to run at setup. * tearDown -- function to run at teardown. * arg -- arguments to pass to the test function. This is to support generator functions that yield arguments. * descriptor -- the function, other than the test, that should be used to construct the test name. This is to support generator functions. N(R t setUpFunct tearDownFuncRt descriptorR@R(RR tsetUpttearDownRRJ((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRs      cCs-|jdk rt|jSt|jSdS(sReturn a round-trip name for this test, a name that can be fed back as input to loadTestByName and (assuming the same plugin configuration) result in the loading of this test. N(RJR RR (R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR(s cCst|jjS(N(RR R,(R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR-ss!Get context (module) of this testcCs0|jr|jnd}t|j|dS(s=Run any setup function attached to the test function tsetupRKRHN(RMRKRH(RHRR (Rtnames((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRKs  cCs0|jr|jnd}t|j|dS(s@Run any teardown function attached to the test function tteardownRLRIN(RORLRI(RIRR (RRN((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRL s  cCsf|j\}}t|dr-|j}n |j}d|j|f}|rbd||f}n|S(Ntcompat_func_names%s.%ss%s%s(RBR)RPR;R,(RRERR((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRs  cCs-|jr|j|jfS|j|jfSdS(sfGet the descriptors of the test function: the function and arguments that will be used to construct the test name. In most cases, this is the function itself and no arguments. For tests generated by generator functions, the original (generator) function and args passed to the generated function are returned. N(RJRR (R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRB%s N(R;R,R<R=R>R ttupleRR(R-R?R*RKRLRRRB(((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRGs      tMethodTestCasecBszeZdZeZd ed dZdZeZ dZ dZ e e d d dZ dZdZdZRS( sTest case wrapper for test methods. Don't use this class directly; it is used internally in nose to create test cases for test methods. cCs||_||_||_||_t|r?tdn|j|_|j|_|jdkr|jj }t |j||_nt j |dS(sInitialize the MethodTestCase. Required argument: * method -- the method to call, may be bound or unbound. In either case, a new instance of the method's class will be instantiated to make the call. Note: In Python 3.x, if using an unbound method, you must wrap it using pyversion.unbound_method. Optional arguments: * test -- the test function to call. If this is passed, it will be called instead of getting a new bound method of the same name as the desired method from the test instance. This is to support generator methods that yield inline functions. * arg -- arguments to pass to the test function. This is to support generator methods that yield arguments. * descriptor -- the function, other than the test, that should be used to construct the test name. This is to support generator methods. s_Unbound methods must be wrapped using pyversion.unbound_method before passing to MethodTestCaseN(tmethodR RRJRt ValueErrortim_classtclstinstR R;RCR@R(RRSR RRJt method_name((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR;s       cCsr|j\}}t|dr-|j}n |j}d|jj|jj|f}|rnd||f}n|S(NRPs%s.%s.%ss%s%s(RBR)RPR;RVR,(RRERR((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR_s     cCs-|jdk rt|jSt|jSdS(sReturn a round-trip name for this test, a name that can be fed back as input to loadTestByName and (assuming the same plugin configuration) result in the loading of this test. N(RJR RRS(R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR(ms cCs|jS(N(RV(R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyR-wss Get context (class) of this testcCst|jddS(NRMRK(RMRK(RRW(R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRK|scCst|jddS(NRORL(RORL(RRW(R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRLscCs-|jr|j|jfS|j|jfSdS(sgGet the descriptors of the test method: the method and arguments that will be used to construct the test name. In most cases, this is the method itself and no arguments. For tests generated by generator methods, the original (generator) method and args passed to the generated method or function are returned. N(RJRRS(R((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRBs N(R;R,R<R=R>R RQRRRR(R-R?R*RKRLRB(((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyRR3s$      (R<tloggingR"RtinspectRt nose.configRt nose.failureRt nose.utilRRRt getLoggerR;tlogt__all__RRR@RGRR(((s:/opt/alt/python27/lib/python2.7/site-packages/nose/case.pyts    b