|fc@sddlmZddlZddlZddlZddlZdejfdYZdejfdYZ e Z de fdYZ d ejfd YZ ed krejndS( i(tStringIONtTest_TestProgramcBsgeZdZdZdejfdYZdejfdYZdZ dZ dZ RS( cstj}gtjjtjjtjjt_ fd}||_ |j d}j j j |jdS(Ncst_j|S(N(tTruetwasRunt assertEqual(t start_dirtpattern(t expectedPathtselfttests(s2/usr/lib64/python2.7/unittest/test/test_program.pyt _find_testss s unittest.test(tunittestt TestLoadertostpathtabspathtdirnamettestt__file__tFalseRR tdiscovert assertTrueRt_tests(RtloaderR tsuite((RRR s2/usr/lib64/python2.7/unittest/test/test_program.pyttest_discovery_from_dotted_path s  $  cstt}dtffdY}|}tjjfd}dtj_|j|d}|tj_|j|tjd|dtdd }|j|j|j|j||j|j d dS( Nt FakeRunnercseZfdZRS(cs ||_S(N(R(RR(tresult(s2/usr/lib64/python2.7/unittest/test/test_program.pytrun!s (t__name__t __module__R((R(s2/usr/lib64/python2.7/unittest/test/test_program.pyR scstj_dS(N(R t TestProgramt parseArgs((t oldParseArgs(s2/usr/lib64/python2.7/unittest/test/test_program.pytrestoreParseArgs(scWsdS(N(tNone(targs((s2/usr/lib64/python2.7/unittest/test/test_program.pyt*tcSs tj`dS(N(R RR(((s2/usr/lib64/python2.7/unittest/test/test_program.pyt removeTest-st testRunnertexitt verbosityi( tobjectR RR t addCleanupRRRRR*(RRRtrunnerR"R'tprogram((R!Rs2/usr/lib64/python2.7/unittest/test/test_program.pyt testNoExits        tFooBarcBseZdZdZRS(cCsdS(N((R((s2/usr/lib64/python2.7/unittest/test/test_program.pyttestPass9scCsdS(N((R((s2/usr/lib64/python2.7/unittest/test/test_program.pyttestFail;s(RRR1R2(((s2/usr/lib64/python2.7/unittest/test/test_program.pyR08s t FooBarLoadercBseZdZdZRS(s3Test loader that returns a suite containing FooBar.cCs|j|jtjgS(N(t suiteClasstloadTestsFromTestCaseRR0(Rtmodule((s2/usr/lib64/python2.7/unittest/test/test_program.pytloadTestsFromModule@s(RRt__doc__R7(((s2/usr/lib64/python2.7/unittest/test/test_program.pyR3>sc CsVtjdtddgdtjdtd|j}|jt|ddS(NR)targvtfoobarR(tstreamt testLoaderR(R tmainRtTextTestRunnerRR3Rthasattr(RR.((s2/usr/lib64/python2.7/unittest/test/test_program.pyt test_NonExitEs  c CsG|jttjddgdtjdtdtd|jdS(NR9R:R(R;R)R<(t assertRaisest SystemExitR R=R>RRR3(R((s2/usr/lib64/python2.7/unittest/test/test_program.pyt test_ExitMs  c CsA|jttjddgdtjdtd|jdS(NR9R:R(R;R<(RARBR R=R>RR3(R((s2/usr/lib64/python2.7/unittest/test/test_program.pyttest_ExitAsDefaultWs   ( RRRR/R tTestCaseR0R R3R@RCRD(((s2/usr/lib64/python2.7/unittest/test/test_program.pyR s    tInitialisableProgramcBsDeZeZdZdZdZdZe j Z dZ dZ dZRS(iRcGsdS(N((RR$((s2/usr/lib64/python2.7/unittest/test/test_program.pyt__init__isN(RRRR)R#RR*t defaultTestR(R tdefaultTestLoaderR<tprogNameRRG(((s2/usr/lib64/python2.7/unittest/test/test_program.pyRF`s RcBs,eZdZdZeZdZdZRS(cKs(|t_tjr$tt_tndS(N(RtinitArgst raiseErrorRt TypeError(Rtkwargs((s2/usr/lib64/python2.7/unittest/test/test_program.pyRGss   cCs |t_tS(N(RRtRESULT(RR((s2/usr/lib64/python2.7/unittest/test/test_program.pyRys N( RRR#RKRRRLRGR(((s2/usr/lib64/python2.7/unittest/test/test_program.pyRns  tTestCommandLineArgscBsPeZdZdZdZdZdZdZdZdZ RS(cCs:t|_d|j_dt_dt_tt_dS(NcSsdS(N(R#(((s2/usr/lib64/python2.7/unittest/test/test_program.pyR%R&( RFR.t createTestsR#RRKRRRL(R((s2/usr/lib64/python2.7/unittest/test/test_program.pytsetUps    cs|jdfd}|_xJdD]B}t_jd|g|jj|jjq+Wjddg|jj|j jdS(Ncs|_t_dS(N(tmsgRR)(RS(R.(s2/usr/lib64/python2.7/unittest/test/test_program.pyt usageExits s-hs-Hs--helps-$(s-hs-Hs--help( R.R#RTRR)R Rt assertIsNoneRStassertIsNotNone(RRTtopt((R.s2/usr/lib64/python2.7/unittest/test/test_program.pyttestHelpAndUnknowns    cCs|j}x=dD]5}d|_|jd|g|j|jdqWx=d D]5}d|_|jd|g|j|jdqPWdS( Ns-qs--quietiis-vs --verbosei(s-qs--quiet(s-vs --verbose(R.R*R R#R(RR.RW((s2/usr/lib64/python2.7/unittest/test/test_program.pyt testVerbositys     cCs |j}xdd d fD]\}}|dkr>t r>qnd|d}d|}xM||fD]?}t||d|jd|g|jt||qcWxY||fD]K}t}t||||jd|g|jt|||qWqWdS( Ntbuffertfailfasttcatcht catchbreaks-%sis--%s(RZRZ(R[R[(R\R]( R.thasInstallHandlertsetattrR#R RtgetattrR+R(RR.targtattrt short_opttlong_optRWtnot_none((s2/usr/lib64/python2.7/unittest/test/test_program.pyttestBufferCatchFailfasts     cCs|j}t|_d|_d|_d|_|j|jtjidd6dd6dd6|jtj d|j |j t dS(NR*R[RZR( R.RR(R*R[RZtrunTestsRRKRtassertIsRRO(RR.((s2/usr/lib64/python2.7/unittest/test/test_program.pyttestRunTestsRunnerClasss       cCsb|j}t|_dt_|j|jtj|jtjd|j |j t dS(NR( R.RR(R#RKRgRURRRhRRO(RR.((s2/usr/lib64/python2.7/unittest/test/test_program.pyttestRunTestsRunnerInstances    cCs|j}tt_t|_d|_d|_d|_d|_|j |j tj i|j tjd|j |j tdS(NR*R[RZR(R.RRRLR(R*R[RZRRgRRKRhRRO(RR.((s2/usr/lib64/python2.7/unittest/test/test_program.pyttestRunTestsOldRunnerClasss        cstjdjfd}j|t_fd}|_j}t|_t |_ |j j jdS(Ns unittest.maincs _dS(N(tinstallHandler((R6toriginal(s2/usr/lib64/python2.7/unittest/test/test_program.pytrestorescs t_dS(N(Rt installed((R(s2/usr/lib64/python2.7/unittest/test/test_program.pytfakeInstallHandlers( tsystmodulesRlR,RRoR.RR]RR(RgR(RRnRpR.((R6RmRs2/usr/lib64/python2.7/unittest/test/test_program.pyttestCatchBreakInstallsHandlers         ( RRRRRXRYRfRiRjRkRs(((s2/usr/lib64/python2.7/unittest/test/test_program.pyRP}s      t__main__(t cStringIORR RqR t unittest.testRERRRFR+RORRPRR=(((s2/usr/lib64/python2.7/unittest/test/test_program.pyts    W