ó {fc@srddlZddlZddlZddlZddlZdejfd„ƒYZedkrnejƒndS(iÿÿÿÿNt TestDiscoverycBs}eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „ZRS( 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((s4/usr/lib64/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(s4/usr/lib64/python2.7/unittest/test/test_discovery.pytrestore_listdirscsˆtj_dS(N(R tpathtisfile((toriginal_isfile(s4/usr/lib64/python2.7/unittest/test/test_discovery.pytrestore_isfile!scsˆtj_dS(N(R Rtisdir((toriginal_isdir(s4/usr/lib64/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(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyt*tcSs |jdƒS(Ntdir(tendswith(R((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR-scSs|jdƒ od|kS(NRR(R(R((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR2scSs|dS(Ns module((R((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR8RcSs|dS(Ns tests((tmodule((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR9Rs/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((RRRRs4/usr/lib64/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(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRIscsˆtj_dS(N(R RR((R(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRLscsˆtj_dS(N(R RR((R(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyROst a_directoryttest_directoryttest_directory2cs ˆjdƒS(Ni(R(R(R(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRTRcSstS(N(tTrue(R((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRWRcstjj|ƒˆkS(N(R Rtbasename(R(t directories(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRZRtModulecBs,eZgZgZd„Zd„ZdZRS(csP|ˆ_ˆjj|ƒtjj|ƒdkrL‡fd†}|ˆ_ndS(NR1csˆjj|||fƒdS(Nt load_tests(tload_tests_argstappend(R tteststpattern(R (s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR7es(RtpathsR9R R4R7(R RR7((R s4/usr/lib64/python2.7/unittest/test/test_discovery.pyt__init__as  cSs|j|jkS(N(R(R tother((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyt__eq__jsN(t__name__t __module__R<R8R=R?tNonet__hash__(((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR6]s  cs ˆ|ƒS(N((R (R6(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRpRcs#|rˆjdƒ‚n|jdS(Ns+use_load_tests should be False for packagess module tests(tfailureExceptionR(R tuse_load_tests(R (s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR'qss/foostest*R7s module tests(RRR RRRRR%tobjectR&R'RR)R*RR<R8(R R RRRR'R-((R6R5RRRRR s4/usr/lib64/python2.7/unittest/test/test_discovery.pyttest_find_tests_with_packageEs4           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(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR‹scSstS(N(tFalse(R((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRŽRcsˆtj(dS(N(tsysR((t orig_sys_path(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyt restore_path’ss/foos/foo/bart top_level_dircSstS(N(R3(R((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRRcSstS(N(R3(R((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRžRcsˆtj_dS(N(R RR((R(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR scsˆj||fƒdgS(NR:(R9(t start_dirR;(t_find_tests_args(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR*¥ss /foo/bar/bazR;s ['tests'](RRR RRRR%RIR(tnormpathRt ImportErrortdiscoverRRtassertInR*tstrt suiteClass( R R RRKt full_pathRR*R-RLRM((RNRJRRs4/usr/lib64/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_((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR¸RcSstS(N(R3(RW((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRºRcs#ˆtj_ˆt_ˆtj(dS(N(R RRRRI((RRRJ(s4/usr/lib64/python2.7/unittest/test/test_discovery.pytrestore¼s  t.ii(RRR RRRRIR%RQRRtgetcwdRtcountTestCasesR)RRPttest_this_does_not_exist(R R RXR-ttest((RRRJs4/usr/lib64/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(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyt do_discoveryÏst somethingRQtfootbar(RFt__new__Rt TestProgramt _do_discoveryt parseArgsR(R tprogramRa((R`s4/usr/lib64/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@RA(((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRkÙscs ˆ‚dS(N(((Rk(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyt usageExitÛstonettwotthreetfour( t ExceptionRFReRRfRlRBt testLoaderRRg(R RlRi((Rks4/usr/lib64/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(NR:(R`R9(R RMR;RL((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRQìs(R@RAR`RQ(((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRtêss-vRYstest*.py(RYstest*.pyN( RFReRRfRrRgRR`RB(R RiRt((s4/usr/lib64/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(NRtcBseZgZd„ZRS(cSs|jj|||fƒdS(NR:(R`R9(R RMR;RL((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRQùs(R@RAR`RQ(((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyRt÷ss-viR:RYstest*.pys --verbosetfishteggsthams-ss-ts-ps-fs-c(RYstest*.pyN(RYstest*.pyN(RYstest*.pyN(Rvstest*.pyN(RvRwN(RvRwRx(Rvstest*.pyN(RYstest*.pyRv(RYRvN(RvRwN(RFReRRfRgRt verbosityR]R`RBt assertFalsetfailfastt catchbreakt assertTrue(R RiRt((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyt4test_command_line_handling_do_discovery_calls_loaderôsr         !cs»dtfd„ƒY}|tjds           cCs–|jƒ}tjƒ}tjjdƒ}tjjdƒ}tjd||fƒ}|jt d||j ddddƒ|j t jd|ƒdS( NRdRcsZ'foo' module incorrectly imported from %r. Expected %r. Is this module globally installed?s^%s$RMR;sfoo.pyi( RƒRRR RR(tretescapetassertRaisesRegexpRPRQRRI(R RUR tmod_dirt expected_dirtmsg((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyttest_detect_module_clash[s    csœ|jƒ}tjj‰tjjdƒ‰tjjdƒ‰‡fd†}|j|ƒ‡‡fd†}|tj_tjƒ}|jddddƒdS(NRdRccsˆtj_dS(N(R Rtrealpath((toriginal_realpath(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR‚qscs2|tjjˆdƒkr.tjjˆdƒS|S(Nsfoo.py(R Rtjoin(R(RˆR‡(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR‹usRMR;sfoo.py( RƒR RR‹R(R%RRRQ(R RUR‚R‹R ((RˆR‡RŒs4/usr/lib64/python2.7/unittest/test/test_discovery.pyttest_module_symlink_okis     cs–tjƒ}ˆg‰tjjtjjtjjƒƒ‰tˆ_ ‡‡‡fd†}||_ |j dƒ}ˆj ˆj ƒˆj |jˆƒdS(Ncstˆ_ˆj|ˆƒˆS(N(R3twasRunR(RMR;(t expectedPathR R:(s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR*„s s unittest.test(RRR RR(tdirnameR]RRHRR*RQR}Rt_tests(R R R*R-((RR R:s4/usr/lib64/python2.7/unittest/test/test_discovery.pyttest_discovery_from_dotted_path}s  $  (R@RAR R/RGRVR^RjRsRuR~RƒRŠRŽR“(((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyR s  + A .    J   t__main__( R R„RIRt unittest.testtTestCaseRR@tmain(((s4/usr/lib64/python2.7/unittest/test/test_discovery.pyts     ÿ†