ó þ¾v]c@sMddlZddlZddlZddlZddlZddlZddlmZmZddl m Z ddlm Z ddl m Z ddlmZmZddlmZmZmZmZmZmZmZmZmZddlmZd d lmZeZ d e fd „ƒYZ!d dd„ƒYZ"defd„ƒYZ#dS(iÿÿÿÿN(tDistutilsErrortDistutilsOptionError(tlog(t TestLoader(tsix(tmaptfilter( tresource_listdirtresource_existstnormalize_patht working_sett_namespace_packagestevaluate_markertadd_activation_listenertrequiret EntryPoint(tCommandi(t_unique_everseentScanningLoadercBseZd„Zdd„ZRS(cCstj|ƒtƒ|_dS(N(Rt__init__tsett_visited(tself((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyRs cCs7||jkrd S|jj|ƒg}|jtj||ƒƒt|dƒrg|j|jƒƒnt|dƒr x“t|j dƒD]|}|j dƒrÂ|dkrÂ|j d|d }n-t |j |dƒr‰|j d|}nq‰|j|j |ƒƒq‰Wnt |ƒ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(RtNonetaddtappendRtloadTestsFromModulethasattrRRt__name__tendswithRtloadTestsFromNametlent suiteClass(Rtmoduletpatterntteststfilet submodule((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyRs$ N(R t __module__RRR(((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyRs tNonDataPropertycBseZd„Zdd„ZRS(cCs ||_dS(N(tfget(RR,((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyRAscCs|dkr|S|j|ƒS(N(RR,(Rtobjtobjtype((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyt__get__Ds N(R R*RRR/(((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyR+@s ttestcBsÂeZdZdZdddgZd „Zd „Zed „ƒZd„Z d„Z e j gd„ƒZ ee j d„ƒƒZed„ƒZd„Zd„Zed„ƒZed„ƒZRS(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=tss9Run single test, case or suite (e.g. 'module.test_suite')s test-runner=trsTest runner to usecCs(d|_d|_d|_d|_dS(N(Rt test_suitet test_modulet test_loadert test_runner(R((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pytinitialize_optionsVs   cCsÝ|jr'|jr'd}t|ƒ‚n|jdkrj|jdkrW|jj|_qj|jd|_n|jdkr”t|jddƒ|_n|jdkr¯d|_n|jdkrÙt|jddƒ|_ndS(Ns1You may specify a module or a suite, but not boths .test_suiteR6s&setuptools.command.test:ScanningLoaderR7(R4R5RRt distributionR6tgetattrR7(Rtmsg((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pytfinalize_options\s cCst|jƒƒS(N(tlistt _test_args(R((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyt test_argsosccsJ|j r!tjdkr!dVn|jr2dVn|jrF|jVndS(Niitdiscovers --verbose(ii(R4tsyst version_infotverbose(R((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyR>ss   cCs|jƒ |ƒWdQXdS(sI Backward compatibility for project_on_sys_path context. N(tproject_on_sys_path(Rtfunc((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pytwith_project_on_sys_path{s c cs¨tjot|jdtƒ}|r¥|jdddƒ|jdƒ|jdƒ}t|j ƒ}|jdd|ƒ|jdƒ|jdddƒ|jdƒn-|jdƒ|jdddƒ|jdƒ|jdƒ}t j }t j j ƒ}zut|jƒ}t j jd|ƒtjƒtd „ƒtd |j|jfƒ|j|gƒ dVWdQXWd|t j (t j jƒt j j|ƒtjƒXdS( Ntuse_2to3tbuild_pytinplaceitegg_infotegg_baset build_exticSs |jƒS(N(tactivate(tdist((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyt¦Rs%s==%s(RtPY3R:R9tFalsetreinitialize_commandt run_commandtget_finalized_commandR t build_libRAtpathtmodulestcopyRKtinsertR RR Rtegg_namet egg_versiontpaths_on_pythonpathtcleartupdate( Rt include_distst with_2to3tbpy_cmdt build_pathtei_cmdtold_patht old_modulest project_path((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyRD‚s8         ccsÈtƒ}tjjd|ƒ}tjjddƒ}z^tjjt|ƒƒ}td||gƒ}tjj|ƒ}|r‹|tjdÓs (tfetch_build_eggstinstall_requirest tests_requiretextras_requiretitemst itertoolstchain(RNtir_dttr_dter_d((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyt install_distsÊs c Cs¢|j|jƒ}dj|jƒ}|jrB|jd|ƒdS|jd|ƒttjdƒ|ƒ}|j |ƒ"|j ƒ|j ƒWdQXWdQXdS(Nt sskipping "%s" (dry run)s running "%s"tlocation( R…R9Rmt_argvtdry_runtannounceRtoperatort attrgetterR\RDt run_tests(Rtinstalled_diststcmdRo((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pytrunØs  c CsEtjrÁt|jdtƒrÁ|jjdƒd}|tkrÁg}|tj kre|j |ƒn|d7}x0tj D]%}|j |ƒry|j |ƒqyqyWt t tj j|ƒƒqÁntjdd|jd|j|jƒd|j|jƒdtƒ}|jjƒsAd|j}|j|tjƒt|ƒ‚ndS(NRGRit testLoadert testRunnertexitsTest failed: %s(RRPR:R9RQR4tsplitR RARWRRwR=Rt __delitem__tunittesttmainRRˆt_resolve_as_epR6R7tresultt wasSuccessfulRŠRtERRORR(RR%t del_modulestnameR0R;((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyRçs(    cCsdg|jS(NR–(R?(R((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyRˆscCs0|dkrdStjd|ƒ}|jƒƒS(su Load the indicated attribute value, called, as a as if it were specified as an entry point. Nsx=(RRtparsetresolve(tvaltparsed((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyR˜s (s test-module=R1s$Run 'test_suite' in specified module(s test-suite=R2s9Run single test, case or suite (e.g. 'module.test_suite')(s test-runner=R3sTest runner to use(R R*t__doc__t descriptiont user_optionsR8R<R+R?R>RFt contextlibtcontextmanagerRDt staticmethodR\R…RRtpropertyRˆR˜(((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyR0Js(     -  (($RiR‹RAR¥R€R–tdistutils.errorsRRt distutilsRRtsetuptools.externRtsetuptools.extern.six.movesRRt pkg_resourcesRRR R R R R RRt setuptoolsRRHRttypet __metaclass__RR+R0(((s=/tmp/pip-install-vZZv26/setuptools/setuptools/command/test.pyts"      @)