ó û^‚Rc@sfddlZddlZddlZddlZdejfd„ƒYZedkrbejƒndS(iÿÿÿÿNt TestDiscoverycBskeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z RS( cCsetjƒ}d|_|jdƒ}|j|dƒts>dS|jtƒ|jdƒWdQXdS(Ns/foos/foo/bar/baz.pysbar.bazs /bar/baz.py(tunittestt TestLoadert_top_level_dirt_get_name_from_patht assertEqualt __debug__t assertRaisestAssertionError(tselftloadertname((s2/usr/lib/python2.7/unittest/test/test_discovery.pyttest_get_name_from_path s  c sˆtjƒ}tj‰‡fd†}tjj‰‡fd†}tjj‰‡fd†}dddddd d gd d gg‰‡fd †t_|j|ƒd„}|tj_|j|ƒd„}|tj_|j|ƒd„|_d„|_ tjj dƒ}||_ t |j |dƒƒ}gdD]} | d^q6} | jgdD]} d| d^qYƒ|j|| ƒdS(Ncs ˆt_dS(N(tostlistdir((toriginal_listdir(s2/usr/lib/python2.7/unittest/test/test_discovery.pytrestore_listdirscsˆtj_dS(N(R tpathtisfile((toriginal_isfile(s2/usr/lib/python2.7/unittest/test/test_discovery.pytrestore_isfile scsˆtj_dS(N(R Rtisdir((toriginal_isdir(s2/usr/lib/python2.7/unittest/test/test_discovery.pyt restore_isdir#sstest1.pystest2.pys not_a_test.pyttest_dirstest.foostest-not-a-module.pyt another_dirstest3.pystest4.pycs ˆjdƒS(Ni(tpop(R(t path_lists(s2/usr/lib/python2.7/unittest/test/test_discovery.pyt)scSs |jdƒS(Ntdir(tendswith(R((s2/usr/lib/python2.7/unittest/test/test_discovery.pyR,scSs|jdƒ od|kS(NRR(R(R((s2/usr/lib/python2.7/unittest/test/test_discovery.pyR1scSs|dS(Ns module((R((s2/usr/lib/python2.7/unittest/test/test_discovery.pyR7scSs|dS(Ns tests((tmodule((s2/usr/lib/python2.7/unittest/test/test_discovery.pyR8ss/foostest*.pyttest1ttest2s module teststtest3ttest4s test_dir.%s(R R!(R"R#(RRR RRRRt addCleanupt_get_module_from_nametloadTestsFromModuletabspathRtlistt _find_teststextendR( R R RRRRRt top_leveltsuiteR texpected((RRRRs2/usr/lib/python2.7/unittest/test/test_discovery.pyttest_find_testss8                 cs“tjƒ}tj‰‡fd†}tjj‰‡fd†}tjj‰‡fd†}dddg‰ˆgggg‰‡fd†t_ˆj|ƒd„tj_ˆj|ƒ‡fd †tj_ˆj|ƒd tfd „ƒY‰‡fd †|_ ‡fd †}||_ d|_ t |j ddƒƒ}ˆj|dddgƒˆjˆjddgƒˆjˆj|dddfgƒdS(Ncs ˆt_dS(N(R R((R(s2/usr/lib/python2.7/unittest/test/test_discovery.pyRHscsˆtj_dS(N(R RR((R(s2/usr/lib/python2.7/unittest/test/test_discovery.pyRKscsˆtj_dS(N(R RR((R(s2/usr/lib/python2.7/unittest/test/test_discovery.pyRNst a_directoryttest_directoryttest_directory2cs ˆjdƒS(Ni(R(R(R(s2/usr/lib/python2.7/unittest/test/test_discovery.pyRSscSstS(N(tTrue(R((s2/usr/lib/python2.7/unittest/test/test_discovery.pyRVscstjj|ƒˆkS(N(R Rtbasename(R(t directories(s2/usr/lib/python2.7/unittest/test/test_discovery.pyRYstModulecBs,eZgZgZd„Zd„ZdZRS(csP|ˆ_ˆjj|ƒtjj|ƒdkrL‡fd†}|ˆ_ndS(NR0csˆjj|||fƒdS(Nt load_tests(tload_tests_argstappend(R tteststpattern(R (s2/usr/lib/python2.7/unittest/test/test_discovery.pyR6ds(RtpathsR8R R3R6(R RR6((R s2/usr/lib/python2.7/unittest/test/test_discovery.pyt__init__`s  cSs|j|jkS(N(R(R tother((s2/usr/lib/python2.7/unittest/test/test_discovery.pyt__eq__isN(t__name__t __module__R;R7R<R>tNonet__hash__(((s2/usr/lib/python2.7/unittest/test/test_discovery.pyR5\s  cs ˆ|ƒS(N((R (R5(s2/usr/lib/python2.7/unittest/test/test_discovery.pyRoscs#|rˆjdƒ‚n|jdS(Ns+use_load_tests should be False for packagess module tests(tfailureExceptionR(Rtuse_load_tests(R (s2/usr/lib/python2.7/unittest/test/test_discovery.pyR&pss/foostest*R6s module tests(RRR RRRRR$tobjectR%R&RR(R)RR;R7(R R RRRR&R,((R5R4RRRRR s2/usr/lib/python2.7/unittest/test/test_discovery.pyttest_find_tests_with_packageDs4           c sÏtjƒ}tjj‰tjj‰‡fd†}d„tj_|j|ƒtj‰‡fd†}|j|ƒtjjtjj dƒƒ}|j t ƒ|j dddƒWdQX|j |j|ƒ|j|tjƒd„tj_d„tj_‡fd †}|j|ƒg‰‡fd †}||_t|_|j d d dƒ}tjjdƒ}tjjd ƒ} |j |d ƒ|j |j|ƒ|j ˆ| d fgƒ|j|tjƒdS(Ncsˆtj_dS(N(R RR((R(s2/usr/lib/python2.7/unittest/test/test_discovery.pyRŠscSstS(N(tFalse(R((s2/usr/lib/python2.7/unittest/test/test_discovery.pyRscsˆtj(dS(N(tsysR((t orig_sys_path(s2/usr/lib/python2.7/unittest/test/test_discovery.pyt restore_path‘ss/foos/foo/bart top_level_dircSstS(N(R2(R((s2/usr/lib/python2.7/unittest/test/test_discovery.pyRœscSstS(N(R2(R((s2/usr/lib/python2.7/unittest/test/test_discovery.pyRscsˆtj_dS(N(R RR((R(s2/usr/lib/python2.7/unittest/test/test_discovery.pyRŸscsˆj||fƒdgS(NR9(R8(t start_dirR:(t_find_tests_args(s2/usr/lib/python2.7/unittest/test/test_discovery.pyR)¤ss /foo/bar/bazR:s ['tests'](RRR RRRR$RHR'tnormpathRt ImportErrortdiscoverRRtassertInR)tstrt suiteClass( R R RRJt full_pathRR)R,RKRL((RMRIRRs2/usr/lib/python2.7/unittest/test/test_discovery.pyt test_discover…s:         csätjƒ}tj‰d„t_tjj‰d„tj_tj‰‡‡‡fd†}|j|ƒ|jdƒ}|j tj ƒtjƒ|j |j ƒdƒt t |ƒdƒd}|jtƒ|jƒWdQXdS(NcSsdgS(Nstest_this_does_not_exist.py((t_((s2/usr/lib/python2.7/unittest/test/test_discovery.pyR·scSstS(N(R2(RV((s2/usr/lib/python2.7/unittest/test/test_discovery.pyR¹scs#ˆtj_ˆt_ˆtj(dS(N(R RRRRH((RRRI(s2/usr/lib/python2.7/unittest/test/test_discovery.pytrestore»s  t.ii(RRR RRRRHR$RPRQtgetcwdRtcountTestCasesR(RROttest_this_does_not_exist(R R RWR,ttest((RRRIs2/usr/lib/python2.7/unittest/test/test_discovery.pyt.test_discover_with_modules_that_fail_to_import³s      cs†tjtjƒ}g‰‡fd†}||_|jddgƒ|jˆgƒ|jddddgƒ|jˆddgƒdS(Ncsˆj|ƒdS(N(R*(targv(targs(s2/usr/lib/python2.7/unittest/test/test_discovery.pyt do_discoveryÎst somethingRPtfootbar(REt__new__Rt TestProgramt _do_discoveryt parseArgsR(R tprogramR`((R_s2/usr/lib/python2.7/unittest/test/test_discovery.pyt$test_command_line_handling_parseArgsÉs c s|dtfd„ƒY‰‡fd†}tjtjƒ}||_d|_|jˆƒ|j ddddgƒWdQXdS(NtStopcBseZRS((R?R@(((s2/usr/lib/python2.7/unittest/test/test_discovery.pyRjØscs ˆ‚dS(N(((Rj(s2/usr/lib/python2.7/unittest/test/test_discovery.pyt usageExitÚstonettwotthreetfour( t ExceptionRERdRReRkRAt testLoaderRRf(R RkRh((Rjs2/usr/lib/python2.7/unittest/test/test_discovery.pyt:test_command_line_handling_do_discovery_too_many_arguments×s  cCs^tjtjƒ}dtfd„ƒY}|ƒ|_|jdgƒ|j|jdgƒdS(NtLoadercBseZgZd„ZRS(cSs|jj|||fƒdS(NR9(R_R8(R RLR:RK((s2/usr/lib/python2.7/unittest/test/test_discovery.pyRPës(R?R@R_RP(((s2/usr/lib/python2.7/unittest/test/test_discovery.pyRséss-vRXstest*.py(RXstest*.pyN( RERdRReRqRfRR_RA(R RhRs((s2/usr/lib/python2.7/unittest/test/test_discovery.pyt;test_command_line_handling_do_discovery_uses_default_loaderæs  cCstjtjƒ}dtfd„ƒY}|jdgd|ƒ|j|jdƒ|j|jdƒ|j|jdgƒg|_tjtjƒ}|jdgd|ƒ|j|jdƒ|j|jdgƒg|_tjtjƒ}|jgd|ƒ|j|jdƒ|j|jdgƒg|_tjtjƒ}|jd gd|ƒ|j|jdƒ|j|jdgƒg|_tjtjƒ}|jd d gd|ƒ|j|jdƒ|j|jdgƒg|_tjtjƒ}|jd d d gd|ƒ|j|jdƒ|j|jdgƒg|_tjtjƒ}|jd d gd|ƒ|j|jdƒ|j|jdgƒg|_tjtjƒ}|jd d gd|ƒ|j|jdƒ|j|jdgƒg|_tjtjƒ}|jdd gd|ƒ|j|jdƒ|j|jdgƒ|j |j ƒ|j |j ƒg|_tjtjƒ}|jdd d d dddgd|ƒ|j|jdƒ|j|jdgƒ|j|jdƒ|j |j ƒ|j |j ƒdS(NRscBseZgZd„ZRS(cSs|jj|||fƒdS(NR9(R_R8(R RLR:RK((s2/usr/lib/python2.7/unittest/test/test_discovery.pyRPøs(R?R@R_RP(((s2/usr/lib/python2.7/unittest/test/test_discovery.pyRsöss-viR9RXstest*.pys --verbosetfishteggsthams-ss-ts-ps-fs-c(RXstest*.pyN(RXstest*.pyN(RXstest*.pyN(Rustest*.pyN(RuRvN(RuRvRw(Rustest*.pyN(RXstest*.pyRu(RXRuN(RuRvN(RERdRReRfRt verbosityR\R_RAt assertFalsetfailfastt catchbreakt assertTrue(R RhRs((s2/usr/lib/python2.7/unittest/test/test_discovery.pyt4test_command_line_handling_do_discovery_calls_loaderósr         !c sAdtfd„ƒY}|tjdsRbcsQˆt_ˆtj_ˆtj_tjd=ˆtjkrMtjjˆƒndS(NRb(R RRRRRHtmodulestremove((RTRRR(s2/usr/lib/python2.7/unittest/test/test_discovery.pytcleanupFs     cSsdgS(Nsfoo.py((RV((s2/usr/lib/python2.7/unittest/test/test_discovery.pyROscSstS(N(R2(RV((s2/usr/lib/python2.7/unittest/test/test_discovery.pyRQscSstS(N(R2(RV((s2/usr/lib/python2.7/unittest/test/test_discovery.pyRSsRcsZ'foo' module incorrectly imported from %r. Expected %r. Is this module globally installed?s^%s$RLR:sfoo.pyi(RERHRR RR'RRRR$RRtretescapetassertRaisesRegexpRORPR( R R5RRRRR tmod_dirt expected_dirtmsg((RTRRRs2/usr/lib/python2.7/unittest/test/test_discovery.pyttest_detect_module_clash=s.              cs–tjƒ}ˆg‰tjjtjjtjjƒƒ‰tˆ_ ‡‡‡fd†}||_ |j dƒ}ˆj ˆj ƒˆj |jˆƒdS(Ncstˆ_ˆj|ˆƒˆS(N(R2twasRunR(RLR:(t expectedPathR R9(s2/usr/lib/python2.7/unittest/test/test_discovery.pyR)ms s unittest.test(RRR RR'tdirnameR\R~RGR‰R)RPR|Rt_tests(R R R)R,((RŠR R9s2/usr/lib/python2.7/unittest/test/test_discovery.pyttest_discovery_from_dotted_pathfs  $  ( R?R@R R.RFRUR]RiRrRtR}RˆR(((s2/usr/lib/python2.7/unittest/test/test_discovery.pyRs  + A .    J )t__main__(R R‚RHRtTestCaseRR?tmain(((s2/usr/lib/python2.7/unittest/test/test_discovery.pyts    ÿp