ó «©\Tc@smdZddlZddlZddlZddlmZddlZddlZddl m Z m Z ddl m Z ddlm Z ddlmZddlmZddlmZddlZddljZdd lmZdd lmZd „Zd „Zd ejfd„ƒYZdejfd„ƒYZdejfd„ƒYZdejfd„ƒYZdS(s"Tests for the 'setuptools' packageiÿÿÿÿN(tdoctest(tDistutilsOptionErrortDistutilsPlatformError(tDistutilsSetupError(t Extension(t LooseVersion(t func_code(tFeature(tRequirecCs}ddl}ddl}|j|jtjjddƒd|jddƒfƒ}tj dkry|j |jdƒƒn|S( Niÿÿÿÿttestss api_tests.txtt optionflagstpackaget pkg_resourcestwin32swin_script_wrapper.txt( Rtunittestt TestSuitet DocFileSuitetostpathtjointELLIPSIStsystplatformtaddTest(RRtsuite((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pytadditional_testsscKsDdtj_|jddgƒztj|SWddtj_XdS(sDReturn distribution from 'setup(**args)', without executing commandst commandlinet script_argstinstallN(t distutilstcoret_setup_stop_aftert setdefaultt setuptoolstsetuptNone(targs((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyt makeSetup s  t DependsTestscBs,eZd„Zd„Zd„Zd„ZRS(cCs¨ttdƒsdSd„}t|ƒ}|jtj|ddƒdƒ|jtj|ddƒdƒ|jtj|ddƒdƒ|jtj|ddƒdƒdS( Ntextract_constantcSsdatadS(Nttest(txtzty(((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pytf15stqiÿÿÿÿR)R(R+R*(thasattrtdepRt assertEqualR'R#(tselfR,tfc((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestExtractConst0s  cCsR|jttjdƒ|jttjdƒtjdƒ\}}}|jƒdS(Nsno-such.-thingssetuptools.non-existentssetuptools.tests(t assertRaisest ImportErrorR/t find_moduletclose(R1tftpti((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestFindModuleGscCs~ttdƒsdSddlm}|jtjddƒ|ƒ|jtjddƒtjƒ|jtjdd ƒtƒdS( Ntget_module_constantiÿÿÿÿ(t __version__temailR=Rtversionssetuptools.testst__doc__( R.R/R>R=R0R<RR?R@(R1R=((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestModuleExtractMscCsvttdƒsdStdddƒ}|j|jdƒ|j|jdƒ|j|jdƒ|j|jdƒ|j|jƒdƒddl m }|j|j ƒ|ƒ|j |j d ƒƒ|j |j d ƒ ƒ|j |j d ƒ ƒ|j |jƒƒ|j |jƒƒtd d ddtƒ}|j |jƒƒ|j |jƒ ƒ|j |j d ƒ ƒtdddƒ}|j |jƒ ƒ|j |jƒ ƒtdddddƒ}|j|jdƒ|j|jdƒ|j|jdƒ|j|jƒdƒ|j|jdƒgtD]}tjj|ƒ^q(}|j |j|ƒƒ|j |j|ƒƒdS(NR'tEmails1.0.3R>R=s Email-1.0.3iÿÿÿÿ(R=s1.0.9s0.9.1tunknowns Email 3000t03000tformatsDo-what-I-means1.0sd-w-i-mtTestsR thomepageshttp://example.com(R.R/RR0tnametmoduletrequested_versiont attributet full_nameR>R=t get_versiont assertTruet version_okt is_presentt is_currentRR#RERGt__path__RRtdirname(R1treqR=R9tpaths((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyt testRequire]s>%(t__name__t __module__R3R;RARV(((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyR&.s   t DistroTestscBsPeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(c Csstddgƒ|_tddgƒ|_tddddd d gd d d gd|j|jfdiƒ|_dS(Nsbar.extsbar.csc.ysy.ctpackagestasa.bsa.b.ctbtct py_modulessb.dR)t ext_modulest package_dir(Rte1te2R%tdist(R1((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pytsetUpŠs cCs#|jt|jtjjƒƒdS(N(RNt isinstanceRcR!t Distribution(R1((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestDistroType•scCsÿ|jjdƒ|j|jjddgƒ|jjdƒ|j|jjdgƒ|j|jjdgƒ|j|jj|j|jgƒ|jjdƒ|j|jjgƒ|j|jjdgƒ|j|jj|jgƒtƒjdƒdS(NR[R\R]R)( Rctexclude_packageR0RZR^R_RaRbR%(R1((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestExcludePackage˜s"cCs¯|jjd|jgƒ|j|jj|jgƒ|jjd|jgƒ|j|jj|j|jgƒ|jjd|jgƒ|j|jj|j|jgƒdS(NR_(RctexcludeRaR0R_Rbtinclude(R1((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestIncludeExclude©s "cCsk|jjddddgƒ|j|jjgƒ|j|jjdgƒ|j|jj|jgƒdS(NRZR]R\R[R)(RcRjR0RZR^R_Ra(R1((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestExcludePackages¶scCsftƒ}|jddgddgd|jgƒtƒ}|jddgddgd|jgƒdS(NRZR[R^R\R_(R%RkRbRj(R1Rc((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyt testEmpty¼s ( cCsÍ|j|jjdƒƒ|jjdƒ|j|jjdƒ ƒ|j|jjdƒƒ|jjdƒ|j|jjdƒ ƒ|j|jjdƒƒ|jjdƒ|j|jjdƒ ƒdS(NR[R\R](RNRcthas_contents_forRh(R1((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyt testContentsÂscCs|jt|jjddƒ|jt|jjddƒ|jt|jjdidd6ƒ|jt|jjdidd6ƒ|jt|jjdidd6ƒ|jt|jjdidd6ƒ|jt|jjddgƒ|jt|jjddgƒdS(Ntnonexistent_optionR)RZR+R_R`R-(R4RRcRkRj(R1((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestInvalidIncludeExcludeÏs         ( RWRXRdRgRiRlRmRnRpRr(((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyRYˆs     t FeatureTestscBs>eZd„Zd„Zd„Zd„Zd„Zd„ZRS(cCsûtdddƒ|_tditddtdd|jgƒd6td dtd d gd d gddgƒd 6tddtd dgddgdd!gƒd6tddtddƒd6dddgd d dgd d dgdtdd gƒgƒ|_dS("Nt Distutilss1.0.3Rtfeaturestfootstandardtrequire_featurestbaztbarRZspkg.barR^tbar_ettremovesbar.exttoptionalspkg.baztscriptssscripts/baz_itt librariestlibfoos foo/foofoo.ctDWIMt availabletbazishtdwimRs --without-barRspkg.fooR_sbar.c(R€s foo/foofoo.c(RRTR%RtTruetFalseRRc(R1((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyRdís"     c Csh|jtddtdddtƒjƒ ƒ|jtddtddƒjƒƒ|jttdƒdS(NR(RwR|R)R‚(RNRR…R†tinclude_by_defaultR4R(R1((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyt testDefaultss #cCs'|jt|jjdj|jƒdS(NR„(R4RRcRut include_in(R1((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestAvailabilityscCsÀ|j}|jd |jkƒ|jd |jkƒ|jd|jkƒ|jd|jkƒ|j|jd d ƒ|j|jddƒ|j|jddƒ|jd |jkƒdS(Ns with-dwims include DWIMs without-dwimsexclude DWIM (default)swith-barsinclude bar (default)s without-bars exclude bars without-fooswith-foos without-baz(s with-dwimNs include DWIM(s without-dwimNsexclude DWIM (default)(swith-barNsinclude bar (default)(s without-barNs exclude bar(RcRNR#tfeature_optionsR0tfeature_negopt(R1Rc((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestFeatureOptionss cCsö|j}|j|jdƒ|j|jdƒ|j|jdƒ|jd|jkƒ|jd|jkƒ|jd|jkƒ|jd|jkƒ|jd |j kƒ|j|j gƒ|j|j |j gƒ|j t|jd ƒdS( NiiR{spkg.barspkg.bazsscripts/baz_itR€s foo/foofoo.cRz(slibfoos foo/foofoo.c(RcR0twith_footwith_bartwith_bazRNR^RZR~RR_RxRTR4Rtinclude_feature(R1Rc((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestUseFeatures's c Cs-|jttditdddƒd6ƒdS(NRuR)R|R+(R4t SystemExitR%R(R1((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestFeatureWithInvalidRemove8s(RWRXRdRˆRŠRR’R”(((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyRsës     tTestCommandTestscBs>eZd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs2tƒjdƒ}|jt|tjjƒƒdS(NR((R%tget_command_objRNReRtcmdtCommand(R1ttest_cmd((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestTestIsCommand?scCsEtdddgƒ}|jdƒ}|jƒ|j|jdƒdS(NRR(s--test-suite=foo.tests.suitesfoo.tests.suite(R%R–tensure_finalizedR0t test_suite(R1tts1((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestLongOptSuiteWNoDefaultCs cCs9tddƒjdƒ}|jƒ|j|jdƒdS(NRœsbar.tests.suiteR((R%R–R›R0Rœ(R1tts2((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestDefaultSuiteIs cCs[tddddddgƒjdƒ}|jƒ|j|jdƒ|j|jdƒdS(NRœs bar.testsRR(s-ms foo.testssfoo.tests.test_suite(R%R–R›R0t test_moduleRœ(R1tts3((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestDefaultWModuleOnCmdLineNs  cCs>tddddddgƒjdƒ}|jt|jƒdS(NRR(s-ms bar.testss-ssfoo.tests.suite(R%R–R4RR›(R1tts4((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyttestConflictingOptionsWs cCs3tƒjdƒ}|jƒ|j|jdƒdS(NR((R%R–R›R0RœR#(R1tts5((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyt testNoSuite]s (RWRXRšRžR R£R¥R§(((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyR•=s     ( R@RRRtsetuptools.testsRtdistutils.coreRt distutils.cmdtdistutils.errorsRRRRtdistutils.versionRtsetuptools.compatRtsetuptools.distR!tsetuptools.dependstdependsR/RRRR%tTestCaseR&RYRsR•(((sF/opt/freeware/lib/python2.7/site-packages/setuptools/tests/__init__.pyts,       ZcR