%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/distutils/tests/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/distutils/tests/test_dist.pyo

ó
Pêáac@sgdZddlZddlZddlZddlZddlZddlZddlmZm	Z	ddl
mZddlZddl
mZmZmZmZddlmZddlmZdefd	„ƒYZd
efd„ƒYZdejejejejfd
„ƒYZdejejejfd„ƒYZd„ZedkrceeƒƒndS(sTests for distutils.dist.iÿÿÿÿN(tDistributiontfix_help_options(tCommand(tTESTFNtcaptured_stdouttrun_unittesttunlink(tsupport(tlogt	test_distcBs eZdZdgZd„ZRS(s#Sample distutils extension command.ssample-option=tSs	help textcCs
d|_dS(N(tNonet
sample_option(tself((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pytinitialize_optionss(ssample-option=R
s	help text(t__name__t
__module__t__doc__tuser_optionsR(((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyR	s	tTestDistributioncBseZdZd„ZRS(s²Distribution subclasses that avoids the default search for
    configuration files.

    The ._config_files attribute must be set before
    .parse_config_files() is called.
    cCs|jS(N(t
_config_files(R
((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pytfind_config_files&s(RRRR(((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyRstDistributionTestCasecBs€eZd„Zd„Zd
d„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„ZRS(cCs7tt|ƒjƒtjtjf|_tjd3dS(Ni(tsuperRtsetUptsystargv(R
((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyR/scCs8|jdt_|jdtj(tt|ƒjƒdS(Nii(RRRRttearDown(R
((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyR4scCs*tƒ}||_|jƒ|jƒ|S(N(RRtparse_config_filestparse_command_line(R
tconfigfilestd((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pytcreate_distribution9s
		

cCsttdƒ!}|jdƒ|jdƒWdQX|jttƒtg}tjjdƒtƒ}|j	|ƒWdQX|j
dƒ|j|jƒdƒt
tj_zFtƒ}|j	|ƒWdQX|j
dƒ|j|jƒdƒWdttj_XdS(Ntws	[global]
s!command_packages = foo.bar, splattbuildit(topenRtwritet
addCleanupRRRtappendRR tseektassertEqualtreadtTruet	distutilstdisttDEBUGtFalse(R
tftfileststdout((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_debug_mode@s"
	

cCs9tjjdƒ|jƒ}|j|jƒdgƒdS(NR"sdistutils.command(RRR'R R)tget_command_packages(R
R((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyt!test_command_packages_unspecifiedVscCsddlm}tjjddddgƒ|jƒ}|j|jƒddd	gƒ|jdƒ}|j	||ƒ|j|j
d
ƒdS(Niÿÿÿÿ(R	s--command-packagessfoo.bar,distutils.testsR	s
-Ssometextsdistutils.commandsfoo.barsdistutils.teststsometext(tdistutils.tests.test_distR	RRtextendR R)R4tget_command_objtassertIsInstanceR(R
R	Rtcmd((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_command_packages_cmdline[s
cCstjjdƒ|jtjtƒttdƒ}z|dIJ|dIJWd|jƒX|j	tgƒ}|j
|jƒdddgƒdd	dgtjd
)|j	tgƒ}|j
|jƒdd	gƒdddgtjd
)|j	tgƒ}|j
|jƒdgƒdS(NR"R!s[global]s!command_packages = foo.bar, splatsdistutils.commandsfoo.bartsplats--command-packagestsporkiR#(RRR'R&tosRRR$tcloseR R)R4(R
R0R((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyt test_command_packages_configfilejs"

cCsÖ|jƒ}tjj|dƒ}t}|didd6dd6dd6d	d
6dd6ƒ}|jjt|d
ƒƒ|didd6dd6dd6dd
6dd6ƒ}tjj|dƒ}|jjt|d
ƒƒdS(NR0tattrsuMister Cafétauthors
my.packagetnameuCafé Juniort
maintaineruCafé torréfiétdescriptionu	Héhéhétlong_descriptionR!sMister CafesCafe Juniors
Cafe torrefietHehehetf2(tmkdtempR?tpathtjoinRtmetadatatwrite_pkg_fileR$(R
ttmp_dirtmy_filetklassR-tmy_file2((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_write_pkg_file„s 

cs™g‰‡fd†}|jttdtjƒ|t_tdidd6dd6dd6dd	6id
6ƒ}|jtˆƒdƒ|jd
t|ƒƒdS(Ncsˆj|ƒdS(N(R'(tmsg(twarns(s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyt_warn¦stwarnRBtxxxRCRDtversiontxxxxturltoptionsi(	R&tsetattrtwarningsRWRR)tlentassertNotIntdir(R
RVR-((RUs5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_empty_optionsŸs	
cCsiidd6dd6}td|ƒ}|jƒ|j|jjddgƒ|j|jjddgƒdS(Nsone,twotkeywordst	platformsRBtonettwo(Rtfinalize_optionsR)RMRdRc(R
RBR-((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_finalize_options²s


cCsƒtƒ}|j|jdƒ|jƒ}|j|dgƒ|j|jdgƒd|_|jƒ}|j|dddgƒdS(Nsdistutils.commandsone,twoReRf(RR)tcommand_packagesRR4(R
R-tcmds((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_get_command_packages½s	
	cCs9tƒ}d}idd6}|jt|j||ƒdS(Ntoktok2tlevel(Rl(RtassertRaisest
ValueErrortannounce(R
R-targstkwargs((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyt
test_announceÉs	
cs|jƒ‰tjdkr3tjjˆdƒ}ntjjˆdƒ}t|dƒ}|jdƒWdQX‡fd†}tjj}|tj_zJtj	j
ƒ}|jƒ}tj	j
didgd	6ƒ}|jƒ}Wd|tj_X|jt
|ƒd
t
|ƒƒdS(Ntposixs.pydistutils.cfgspydistutils.cfgR!s[distutils]
csˆS(N((RK(t	temp_home(s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyt	_expanderÛsRBs
--no-user-cfgtscript_argsi(RJR?RDRKRLR$R%t
expanduserR,R-RRR)R_(R
t
user_filenameR0Rwtold_expanderRt	all_filesR1((Rvs5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_find_config_files_disableÐs"
((RRRRR R3R5R<RARSRbRhRkRtR}(((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyR*s											tMetadataTestCasecBs¡eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„Zd„Zd„ZRS(cCs-tt|ƒjƒtjtjf|_dS(N(RR~RRR(R
((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyRñscCs8|jdt_|jdtj(tt|ƒjƒdS(Nii(RRRR~R(R
((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyRõscCsMidd6dd6dgd6}t|ƒ}|j|ƒ}|jd|ƒdS(NtBoaRDs3.0RYs#Programming Language :: Python :: 3tclassifierssMetadata-Version: 1.1(Rtformat_metadatatassertIn(R
RBR-tmeta((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_classifierús

cCsJidd6dd6dd6}t|ƒ}|j|ƒ}|jd|ƒdS(NRRDs3.0RYshttp://example.org/boatdownload_urlsMetadata-Version: 1.1(RRR‚(R
RBR-Rƒ((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_download_urls

cCsotjdƒ}idd6dd6|d6}t|ƒ}|j|ƒ}|jdd
dƒ}|j||ƒdS(Nsc        example::
              We start here
            and continue here
          and end here.tpackageRDs1.0RYRGs
it s        (ttextwraptdedentRRtreplaceR‚(R
t	long_descRBR-Rƒ((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_long_descriptions	

cCs…idd6dd6}t|ƒ}|j|ƒ}|jd|ƒ|jd|jƒƒ|jd|jƒƒ|jd|jƒƒdS(	NR‡RDs1.0RYsMetadata-Version: 1.0s	provides:s	requires:s
obsoletes:(RRR‚R`tlower(R
RBR-Rƒ((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_simple_metadatas

cCs·idd6dd6ddgd6}t|ƒ}|j|jjƒddgƒ|j|jƒddgƒ|j|ƒ}|jd|ƒ|jd|jƒƒ|jd	|jƒƒdS(
NR‡RDs1.0RYspackage.subtprovidessMetadata-Version: 1.1s	requires:s
obsoletes:(RR)RMtget_providesRR‚R`RŽ(R
RBR-Rƒ((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyt
test_provides!s


cCs/|jttidd6dd6dgd6ƒdS(NR‡RDs1.0RYsmy.pkg (splat)R(RoRpR(R
((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_provides_illegal/s
cCs×idd6dd6ddgd6}t|ƒ}|j|jjƒddgƒ|j|jƒddgƒ|j|ƒ}|jd|ƒ|jd	|jƒƒ|jd
|ƒ|jd|ƒ|jd|jƒƒdS(
NR‡RDs1.0RYtothersanother (==1.0)trequiressMetadata-Version: 1.1s	provides:sRequires: othersRequires: another (==1.0)s
obsoletes:(RR)RMtget_requiresRR‚R`RŽ(R
RBR-Rƒ((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyt
test_requires5s


cCs/|jttidd6dd6dgd6ƒdS(NR‡RDs1.0RYsmy.pkg (splat)R•(RoRpR(R
((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_requires_illegalEs
cCs×idd6dd6ddgd6}t|ƒ}|j|jjƒddgƒ|j|jƒddgƒ|j|ƒ}|jd|ƒ|jd	|jƒƒ|jd
|jƒƒ|jd|ƒ|jd|ƒdS(
NR‡RDs1.0RYR”sanother (<1.0)t	obsoletessMetadata-Version: 1.1s	provides:s	requires:sObsoletes: othersObsoletes: another (<1.0)(RR)RMt
get_obsoletesRR‚R`RŽ(R
RBR-Rƒ((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_obsoletesKs


cCs/|jttidd6dd6dgd6ƒdS(NR‡RDs1.0RYsmy.pkg (splat)R™(RoRpR(R
((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_obsoletes_illegal[s
cCs&tjƒ}|jj|ƒ|jƒS(N(tStringIORMRNtgetvalue(R
R-tsio((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyRascCstjdkrd}nd}|jƒ}tjj||ƒ}t|dƒ}z|jdƒWd|jƒXztƒ}t	j
dkr´|tjd<|jƒ}|j
||ƒnt	j
d	krü|tjd<|jƒ}|j
||d
||fƒnWdtj|ƒXdS(NRus.pydistutils.cfgspydistutils.cfgR!t.tlinuxtdarwintHOMEtwin32s%r not found in %r(R¡R¢(R?RDRJRKRLR$R%R@RRtplatformtenvironRR‚tremove(R
Rzttemp_dirR0R-R1((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_custom_pydistutilsfs*		

cCsDd
dg}t|ƒ}|j|d	dƒ|j|dd
ƒdS(NtatbtcRiiiii(RªR«R¬R(iiii(RªR«R¬(iii(RR)(R
thelp_tuplest
fancy_options((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_fix_help_options‰scCs¤|jtjtjjƒtƒ}gt_d|_d|_	t
ƒ}|jƒWdQXg|jƒj
dƒD]}|jƒdkro|^qo}|j|ƒdS(Nissetup.pys
R#(R&Rt
set_thresholdt_global_logt	thresholdRRRthelptscript_nameRRRžtsplittstript
assertTrue(R
R-tstlinetoutput((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_show_helps				cCs0idd6dd6dd6dd6d	d
6ddgd
6dgd6}t|ƒ}|j}tjƒ}|j|ƒ|jdƒ|j|ƒ|j|jdƒ|j|jdƒ|j|j	dƒ|j|j
d	ƒ|j|jddgƒ|j|jdgƒ|j|j
dƒ|j|jdgƒdS(NR‡RDs1.0RYtdescRGRXRFshttp://example.comR…ReRfRctfooR•itUNKNOWN(RRMRRNR(t
read_pkg_fileR)RDRYRFR…RcRdR™RR•(R
RBR-RMtPKG_INFO((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyttest_read_metadatas*


	


(RRRRR„R†RRR’R“R—R˜R›RœRR©R¯R»RÁ(((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyR~îs"						
								#		cCs<tjƒ}|jtjtƒƒ|jtjtƒƒ|S(N(tunittestt	TestSuitetaddTestt	makeSuiteRR~(tsuite((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyt
test_suite¹st__main__(RR?RRRÂR^R‰tdistutils.distRRt
distutils.cmdRR,ttest.test_supportRRRRtdistutils.testsRRR	RtTempdirManagertLoggingSilencertEnvironGuardtTestCaseRR~RÇR(((s5/usr/local/lib/python2.7/distutils/tests/test_dist.pyt<module>s."	ÁÊ	

Zerion Mini Shell 1.0