ó ž­çSc@sÒddlmZddlmZddlZddlZddlmZmZmZm Z m Z m Z m Z m Z ddlmZddlmZddlmZdefd „ƒYZd efd „ƒYZdS( iÿÿÿÿ(tDistutilsOptionError(t TestLoaderN(tresource_listdirtresource_existstnormalize_patht working_sett_namespace_packagestadd_activation_listenertrequiret EntryPoint(tCommand(tPY3(t unittest_maintScanningLoadercBseZd„ZRS(cCsg}|jtj||ƒƒt|dƒrD|j|jƒƒnt|dƒréx“t|jdƒD]|}|jdƒrŸ|dkrŸ|jd|d }n-t|j|dƒrf|jd|}nqf|j|j |ƒƒqfWnt |ƒd kr|j |ƒS|d Sd S( sReturn a suite of all tests cases contained in the given module If the module is a package, load tests from all the modules in it. If the module has an ``additional_tests`` function, call it and add the return value to the tests. tadditional_testst__path__ts.pys __init__.pyt.iýÿÿÿs /__init__.pyiiN( tappendRtloadTestsFromModulethasattrRRt__name__tendswithRtloadTestsFromNametlent suiteClass(tselftmoduletteststfilet submodule((sA/usr/local/lib/python2.7/site-packages/setuptools/command/test.pyRs (Rt __module__R(((sA/usr/local/lib/python2.7/site-packages/setuptools/command/test.pyR sttestcBs_eZdZdZdddgZd „Zd „Zd „Zd„Zd„Z e d„ƒZ RS(s.Command to run unit tests after in-place builds#run unit tests after in-place builds test-module=tms$Run 'test_suite' in specified modules test-suite=tss1Test suite to run (e.g. 'some_module.test_suite')s test-runner=trsTest runner to usecCs(d|_d|_d|_d|_dS(N(tNonet test_suitet test_modulet test_loadert test_runner(R((sA/usr/local/lib/python2.7/site-packages/setuptools/command/test.pytinitialize_options9s   cCsü|jdkrC|jdkr0|jj|_q[|jd|_n|jr[tdƒ‚n|jg|_|jr‰|jjddƒn|jdkr³t |jddƒ|_n|jdkrÎd|_n|j dkrøt |jddƒ|_ ndS(Ns .test_suites1You may specify a module or a suite, but not bothis --verboseR's&setuptools.command.test:ScanningLoaderR(( R%R$R&t distributionRt test_argstverbosetinsertR'tgetattrR((R((sA/usr/local/lib/python2.7/site-packages/setuptools/command/test.pytfinalize_options?s     cCsˆtot|jdtƒ}|r¢|jdddƒ|jdƒ|jdƒ}t|jƒ}|jdd|ƒ|jdƒ|jdddƒ|jdƒn-|jdƒ|jdddƒ|jdƒ|jdƒ}t j }t j j ƒ}zXt j j dt|jƒƒtjƒtd „ƒtd |j|jfƒ|ƒWd|t j (t j jƒt j j|ƒtjƒXdS( Ntuse_2to3tbuild_pytinplaceitegg_infotegg_baset build_exticSs |jƒS(N(tactivate(tdist((sA/usr/local/lib/python2.7/site-packages/setuptools/command/test.pytxss%s==%s(R R.R*tFalsetreinitialize_commandt run_commandtget_finalized_commandRt build_libtsystpathtmodulestcopyR-R4Rt__init__RRtegg_namet egg_versiontcleartupdate(Rtfunct with_2to3tbpy_cmdt build_pathtei_cmdtold_patht old_modules((sA/usr/local/lib/python2.7/site-packages/setuptools/command/test.pytwith_project_on_sys_pathVs4          cCsª|jjr%|jj|jjƒn|jjrJ|jj|jjƒn|jr¦dj|jƒ}|jr‚|jd|ƒq¦|jd|ƒ|j |j ƒndS(Nt s skipping "unittest %s" (dry run)srunning "unittest %s"( R*tinstall_requirestfetch_build_eggst tests_requireR%tjoinR+tdry_runtannounceRNt run_tests(Rtcmd((sA/usr/local/lib/python2.7/site-packages/setuptools/command/test.pytruns     c CstrÂt|jdtƒrÂ|jdjdƒd}|tkrÂg}|tjkrf|j |ƒn|d7}x0tjD]%}|j |ƒrz|j |ƒqzqzWt t tjj |ƒƒqÂntddtjg|jd|j|jƒd|j|jƒƒdS(NR0iÿÿÿÿRit testLoadert testRunner(R R.R*R9R+tsplitRR>R@Rt startswithtlisttmapt __delitem__R R$tunittestt__file__t_resolve_as_epR'R((RRt del_modulestname((sA/usr/local/lib/python2.7/site-packages/setuptools/command/test.pyRVs  cCs6|dkrdStjd|ƒ}|jdtƒƒS(su Load the indicated attribute value, called, as a as if it were specified as an entry point. Nsx=R(R$R tparsetloadR9(tvaltparsed((sA/usr/local/lib/python2.7/site-packages/setuptools/command/test.pyRb¦s (s test-module=R!s$Run 'test_suite' in specified module(s test-suite=R"s1Test suite to run (e.g. 'some_module.test_suite')(s test-runner=R#sTest runner to use( RRt__doc__t descriptiont user_optionsR)R/RNRXRVt staticmethodRb(((sA/usr/local/lib/python2.7/site-packages/setuptools/command/test.pyR -s    +  (tdistutils.errorsRR`RR>t pkg_resourcesRRRRRRRR t setuptoolsR tsetuptools.compatR tsetuptools.py31compatR R R (((sA/usr/local/lib/python2.7/site-packages/setuptools/command/test.pyts  :