usr/lib64/python2.7/unittest/test/test_program.pyc000064400000024351147205013530016133 0ustar00 |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(cCsts tdS(N(RtAssertionError(R((s2/usr/lib64/python2.7/unittest/test/test_program.pyttestPass9scCsts tdS(N(RR1(R((s2/usr/lib64/python2.7/unittest/test/test_program.pyttestFail;s(RRR2R3(((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__R8(((s2/usr/lib64/python2.7/unittest/test/test_program.pyR4>sc CsVtjdtddgdtjdtd|j}|jt|ddS(NR)targvtfoobarR(tstreamt testLoaderR(R tmainRtTextTestRunnerRR4Rthasattr(RR.((s2/usr/lib64/python2.7/unittest/test/test_program.pyt test_NonExitEs  c CsG|jttjddgdtjdtdtd|jdS(NR:R;R(R<R)R=(t assertRaisest SystemExitR R>R?RRR4(R((s2/usr/lib64/python2.7/unittest/test/test_program.pyt test_ExitMs  c CsA|jttjddgdtjdtd|jdS(NR:R;R(R<R=(RBRCR R>R?RR4(R((s2/usr/lib64/python2.7/unittest/test/test_program.pyttest_ExitAsDefaultWs   ( RRRR/R tTestCaseR0R R4RARDRE(((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=tprogNameRRH(((s2/usr/lib64/python2.7/unittest/test/test_program.pyRG`s RcBs,eZdZdZeZdZdZRS(cKs(|t_tjr$tt_tndS(N(RtinitArgst raiseErrorRt TypeError(Rtkwargs((s2/usr/lib64/python2.7/unittest/test/test_program.pyRHss   cCs |t_tS(N(RRtRESULT(RR((s2/usr/lib64/python2.7/unittest/test/test_program.pyRys N( RRR#RLRRRMRHR(((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&( RGR.t createTestsR#RRLRRRM(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)(RT(R.(s2/usr/lib64/python2.7/unittest/test/test_program.pyt usageExits s-hs-Hs--helps-$(s-hs-Hs--help( R.R#RURR)R Rt assertIsNoneRTtassertIsNotNone(RRUtopt((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.RX((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(R[R[(R\R\(R]R^( R.thasInstallHandlertsetattrR#R RtgetattrR+R(RR.targtattrt short_opttlong_optRXtnot_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\R[R( R.RR(R*R\R[trunTestsRRLRtassertIsRRP(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#RLRhRVRRRiRRP(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\R[R(R.RRRMR(R*R\R[RRhRRLRiRRP(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((R7toriginal(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( tsystmodulesRmR,RRpR.RR^RR(RhR(RRoRqR.((R7RnRs2/usr/lib64/python2.7/unittest/test/test_program.pyttestCatchBreakInstallsHandlers         ( RRRSRYRZRgRjRkRlRt(((s2/usr/lib64/python2.7/unittest/test/test_program.pyRQ}s      t__main__(t cStringIORR RrR t unittest.testRFRRRGR+RPRRQRR>(((s2/usr/lib64/python2.7/unittest/test/test_program.pyts    W