ó b-äQc@sŒddlmZddlmZddlZddlTddlmZddlmZm Z defd„ƒYZ d efd „ƒYZ dS( iÿÿÿÿ(tCommand(tDistutilsOptionErrorN(t*(t_namespace_packages(t TestLoadertmaintScanningLoadercBseZd„ZRS(cCs&g}|jdkr1|jtj||ƒƒnt|dƒrV|j|jƒƒnt|dƒrûx“t|jdƒD]|}|jdƒr±|dkr±|jd|d }n-t|j|d ƒrx|jd|}nqx|j|j |ƒƒqxWnt |ƒ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. ssetuptools.tests.doctesttadditional_testst__path__ts.pys __init__.pyt.iýÿÿÿs /__init__.pyiiN( t__name__tappendRtloadTestsFromModulethasattrRtresource_listdirtendswithtresource_existstloadTestsFromNametlent suiteClass(tselftmoduletteststfilet submodule((s;/usr/lib/python2.7/site-packages/setuptools/command/test.pyR s" (R t __module__R (((s;/usr/lib/python2.7/site-packages/setuptools/command/test.pyRsttestcBsMeZdZdZd dgZd„Zd „Zd „Zd „Zd „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')cCsd|_d|_d|_dS(N(tNonet test_suitet test_modulet test_loader(R((s;/usr/lib/python2.7/site-packages/setuptools/command/test.pytinitialize_options7s  cCsÒ|jdkrC|jdkr0|jj|_q[|jd|_n|jr[tdƒ‚n|jg|_|jr‰|jjddƒn|jdkr³t |jddƒ|_n|jdkrÎd|_ndS(Ns .test_suites1You may specify a module or a suite, but not bothis --verboseR!s&setuptools.command.test:ScanningLoader( RRR t distributionRt test_argstverbosetinsertR!tgetattr(R((s;/usr/lib/python2.7/site-packages/setuptools/command/test.pytfinalize_options=s   cCs‹tjd kr¥t|jdtƒr¥|jdddƒ|jdƒ|jdƒ}t|j ƒ}|jdd|ƒ|jdƒ|jdddƒ|jdƒn-|jdƒ|jddd ƒ|jdƒ|jdƒ}tj }tj j ƒ}zXtj j dt|jƒƒtjƒtd „ƒtd |j|jfƒ|ƒWd|tj (tj jƒtj j|ƒtjƒXdS( Nituse_2to3tbuild_pytinplaceitegg_infotegg_baset build_exticSs |jƒS(N(tactivate(tdist((s;/usr/lib/python2.7/site-packages/setuptools/command/test.pyttss%s==%s(i(tsyst version_infoR'R#tFalsetreinitialize_commandt run_commandtget_finalized_commandtnormalize_patht build_libtpathtmodulestcopyR&R-t working_sett__init__tadd_activation_listenertrequiretegg_namet egg_versiontcleartupdate(Rtfunctbpy_cmdt build_pathtei_cmdtold_patht old_modules((s;/usr/lib/python2.7/site-packages/setuptools/command/test.pytwith_project_on_sys_pathTs2$          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_requireRtjoinR$tdry_runtannounceRKt run_tests(Rtcmd((s;/usr/lib/python2.7/site-packages/setuptools/command/test.pytrun~s    cCs2ddl}tjd kr×t|jdtƒr×|jdjdƒd}|tkr×g}|tj kr{|j |ƒn|d7}x0tj D]%}|j |ƒr|j |ƒqqWt t tj j|ƒƒq×ntjd|jƒ}|jdtƒ}|ƒ}|jdd|jg|jd|ƒdS( NiÿÿÿÿiR)R isx=R@t testLoader(i(tunittestR2R3R'R#R4R$tsplitRR;R t startswithtlisttmapt __delitem__t EntryPointtparseR!tloadRRt__file__(RRWRt del_modulestnamet loader_ept loader_classtcks((s;/usr/lib/python2.7/site-packages/setuptools/command/test.pyRSs$ $   (s test-module=Rs$Run 'test_suite' in specified module(s test-suite=Rs1Test suite to run (e.g. 'some_module.test_suite')( R Rt__doc__t descriptiont user_optionsR"R(RKRURS(((s;/usr/lib/python2.7/site-packages/setuptools/command/test.pyR+s    * ( t setuptoolsRtdistutils.errorsRR2t pkg_resourcesRRWRRRR(((s;/usr/lib/python2.7/site-packages/setuptools/command/test.pyts  #