ó û^‚Rc@sûddlZddlZddlZddlZddlZddlmZddlZeje edƒdƒej ej dkdƒej ej dkdƒd ej fd „ƒYƒƒƒZ eje edƒdƒej ej dkdƒej ej dkdƒd e fd „ƒYƒƒƒZeje edƒdƒej ej dkdƒej ej dkdƒd e fd„ƒYƒƒƒZeje edƒdƒej ej dkdƒej ej dkdƒde fd„ƒYƒƒƒZdS(iÿÿÿÿN(tStringIOtkillsTest requires os.killtwin32sTest cannot run on Windowstfreebsd6s9Test kills regrtest on freebsd6 if threads have been usedt TestBreakcBsŒeZdZd„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z d„Z d „Z d „Zd „Zd „Zd „ZRS(cCsAtjtjƒ|_|jdk r=tjtj|jƒndS(N(tsignalt getsignaltSIGINTt_default_handlert int_handlertNone(tself((s./usr/lib/python2.7/unittest/test/test_break.pytsetUpscCs8tjtj|jƒtjƒtj_dtj_ dS(N( RRRtweakreftWeakKeyDictionarytunittesttsignalst_resultsR t_interrupt_handler(R ((s./usr/lib/python2.7/unittest/test/test_break.pyttearDownscCs–tjtjƒ}tjƒ|jtjtjƒ|ƒy#tjƒ}tj|tjƒWnt k r{|j dƒnX|j tj j jƒdS(NsKeyboardInterrupt not handled(RRRRtinstallHandlertassertNotEqualtostgetpidRtKeyboardInterrupttfailt assertTrueRRtcalled(R tdefault_handlertpid((s./usr/lib/python2.7/unittest/test/test_break.pyttestInstallHandlers   cCsmtjƒ}tj|ƒxMtjjD]2}||kr<Pq&||k r&|jdƒq&q&W|jdƒdS(Nsodd object in result setsresult not found(Rt TestResulttregisterResultRRR(R tresulttref((s./usr/lib/python2.7/unittest/test/test_break.pyttestRegisterResult,s    cs£tjtjƒ}tjƒ}tjƒtj|ƒˆjtjtjƒ|ƒ‡fd†}y||ƒWntk rŽˆj dƒnXˆj |j ƒdS(Ncs<tjƒ}tj|tjƒt|_ˆj|jƒdS(N( RRRRRtTruet breakCaughtRt shouldStop(R!R(R (s./usr/lib/python2.7/unittest/test/test_break.pyttestBs  sKeyboardInterrupt not handled( RRRRRRR RRRRR%(R RR!R'((R s./usr/lib/python2.7/unittest/test/test_break.pyttestInterruptCaught9s    cs tjtjƒtjkr+ˆjdƒntjƒ}tjƒtj|ƒ‡fd†}y||ƒWnt k r~nXˆj dƒˆj |j ƒdS(Ns&test requires SIGINT to not be ignoredcs\tjƒ}tj|tjƒt|_ˆj|jƒtj|tjƒˆj dƒdS(Ns#Second KeyboardInterrupt not raised( RRRRRR$R%RR&R(R!R(R (s./usr/lib/python2.7/unittest/test/test_break.pyR'Xs   s#Second KeyboardInterrupt not raised( RRRtSIG_IGNtskipTestRRRR RRRR%(R R!R'((R s./usr/lib/python2.7/unittest/test/test_break.pyttestSecondInterruptOs     cCsâtjƒtjƒ}tj|ƒtjtjƒ}tjƒ}tj|ƒ|jtjtjƒ|ƒtjƒ}d„}y||ƒWntk r­|j dƒnX|j |j ƒ|j |j ƒ|j |j ƒdS(NcSs#tjƒ}tj|tjƒdS(N(RRRRR(R!R((s./usr/lib/python2.7/unittest/test/test_break.pyR'vs sKeyboardInterrupt not handled( RRRR RRRt assertEqualRRRR&t assertFalse(R R!t new_handlertresult2tresult3R'((s./usr/lib/python2.7/unittest/test/test_break.pyttestTwoResultsis         cs±tjtjƒtjkr+|jdƒntjƒtjtjƒ‰‡fd†}tjtj|ƒy#tjƒ}tj |tjƒWnt k rŸnX|j dƒdS(Ns&test requires SIGINT to not be ignoredcsˆ||ƒdS(N((tframetsignum(thandler(s./usr/lib/python2.7/unittest/test/test_break.pyR.ss6replaced but delegated handler doesn't raise interrupt( RRRR)R*RRRRRRR(R R.R((R4s./usr/lib/python2.7/unittest/test/test_break.pyttestHandlerReplacedButCalled„s   cCsDtjdtƒƒ}|jtjƒƒ}|j|tjjƒdS(Ntstream(RtTextTestRunnerRtrunt TestSuitetassertInRR(R trunnerR!((s./usr/lib/python2.7/unittest/test/test_break.pyt testRunner›scCsStjƒ}tj|ƒtj|ƒ}~tjƒtjƒ|j|ƒƒdS(N(RRR R R"tgctcollectt assertIsNone(R R!R"((s./usr/lib/python2.7/unittest/test/test_break.pyttestWeakReferences£s   cCs tjƒ}tj|ƒtjƒ|jtj|ƒƒ|jtjtjƒƒƒy#tjƒ}tj |t j ƒWnt k r‹nX|j|j ƒdS(N(RRR RRt removeResultR-RRRRRRR&(R R!R((s./usr/lib/python2.7/unittest/test/test_break.pyttestRemoveResult°s     cs¨tƒ‰tƒ‰tƒ‰tƒ‰tjtjƒ}dtf‡fd†ƒY‰dtjf‡‡‡‡fd†ƒY}|tƒ}|jƒ|jˆj didd6ˆd6ˆd6fgƒ|jˆj ˆgƒ|j|j ˆƒ|jtjtjƒ|ƒgˆ_ gˆ_ |t ƒ}|jƒ|jˆj d idd6ˆd6ˆd6fgƒ|jˆj ˆgƒ|j|j ˆƒ|jtjtjƒ|ƒdS( Nt FakeRunnercs,eZgZgZd„Z‡fd†ZRS(c_s|jj||fƒdS(N(tinitArgstappend(R targstkwargs((s./usr/lib/python2.7/unittest/test/test_break.pyt__init__Ìscs|jj|ƒˆS(N(trunArgsRE(R R'(R!(s./usr/lib/python2.7/unittest/test/test_break.pyR8Îs(t__name__t __module__RDRIRHR8((R!(s./usr/lib/python2.7/unittest/test/test_break.pyRCÉs tProgramcs eZ‡‡‡‡fd†ZRS(csCt|_ˆ|_ˆ|_||_ˆ|_ˆ|_d|_dS(N( tFalsetexitt verbositytfailfastt catchbreakR<R'R R!(R RQ(RCRPR'RO(s./usr/lib/python2.7/unittest/test/test_break.pyRHÓs      (RJRKRH((RCRPR'RO(s./usr/lib/python2.7/unittest/test/test_break.pyRLÒstbufferRORP(((tobjectRRRRt TestProgramRMtrunTestsR,RDR RIR!R$R(R RRLtp((RCRPR!R'ROs./usr/lib/python2.7/unittest/test/test_break.pyttestMainInstallsHandlerÂs2     (      cCsltjtjƒ}tjƒtjƒ|jtjtjƒ|ƒtjƒ|jtjtjƒ|ƒdS(N(RRRRRt removeHandlerR,(R R((s./usr/lib/python2.7/unittest/test/test_break.pyttestRemoveHandlerôs    cs^tjtjƒ‰tjƒtj‡‡fd†ƒ}|ƒˆjtjtjƒˆƒdS(Ncs ˆjtjtjƒˆƒdS(N(R,RRR((RR (s./usr/lib/python2.7/unittest/test/test_break.pyR's(RRRRRRXR(R R'((RR s./usr/lib/python2.7/unittest/test/test_break.pyttestRemoveHandlerAsDecoratorþs  N(RJRKR R R RRR#R(R+R1R5R<R@RBRWRYRZ(((s./usr/lib/python2.7/unittest/test/test_break.pyR s         2 tTestBreakDefaultIntHandlercBseZejZRS((RJRKRtdefault_int_handlerR (((s./usr/lib/python2.7/unittest/test/test_break.pyR[ stTestBreakSignalIgnoredcBseZejZRS((RJRKRR)R (((s./usr/lib/python2.7/unittest/test/test_break.pyR]stTestBreakSignalDefaultcBseZejZRS((RJRKRtSIG_DFLR (((s./usr/lib/python2.7/unittest/test/test_break.pyR^s(R=RtsysRR t cStringIORRt skipUnlessthasattrtskipIftplatformtTestCaseRR[R]R^(((s./usr/lib/python2.7/unittest/test/test_break.pyts,      ø