%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/test/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/test/test_sysconfig.pyo

ó
Nêáac@sdZddlZddlZddlZddlZddlZddlmZmZddlm	Z	m
Z
mZmZddl
Z
ddl
mZmZmZmZmZmZmZmZmZmZddlZdejfd„ƒYZd„Zed	kreƒndS(
sTests for sysconfig.iÿÿÿÿN(tcopytdeepcopy(trun_unittesttTESTFNtunlinkt
get_attribute(
t	get_pathstget_platformtget_config_varstget_pathtget_path_namest_INSTALL_SCHEMESt_get_default_schemet_expand_varstget_scheme_namestget_config_vart
TestSysConfigcBsÑeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
ejejjdƒd
ƒd„ƒZd„Zd„Zejejdkdƒd„ƒZRS(cCsùtt|ƒjƒtj|_d|_tt	dƒrVt	j
|_
t	j
ƒ|_nd|_
d|_|jt	_
t	j
|_
tj|_tj|_t	j|_t	jj|_t	jj|_t	jj|_ttjƒ|_tt	jƒ|_dS(sMake a copy of sys.pathtunameN(tsuperRtsetUptsystpathtsys_pathtNonetmakefilethasattrtosRt_unamet
_get_unametnametplatformtversiontseptjointisabst
splitdriveRt	sysconfigt_CONFIG_VARSt_config_varsRtenvirontold_environ(tself((s//usr/local/lib/python2.7/test/test_sysconfig.pyRs$
			cCsa|jtj(|jdk	r/tj|jƒn|jƒ|jdk	rW|jt_nt`|j	t_	|j
t_
|jt_|jt_|j
tj_
|jtj_|jtj_t|jƒt_xE|jjƒD]4\}}tjj|ƒ|krÜ|tj|<qÜqÜWx3tjjƒD]"}||jkr$tj|=q$q$Wtt|ƒjƒdS(sRestore sys.pathN(RRRRRRRt_cleanup_testfnRRRRR R!R"R#RR&R$R%R(titemsR'tgettkeysRRttearDown(R)tkeytvalue((s//usr/local/lib/python2.7/test/test_sysconfig.pyR.-s,

cCs
||_dS(N(R(R)R((s//usr/local/lib/python2.7/test/test_sysconfig.pyt
_set_unameIscCs|jS(N(R(R)((s//usr/local/lib/python2.7/test/test_sysconfig.pyRLscCsNt}tjj|ƒr(tj|ƒn"tjj|ƒrJtj|ƒndS(N(RRRtisfiletremovetisdirtshutiltrmtree(R)R((s//usr/local/lib/python2.7/test/test_sysconfig.pyR*Os
cCs|jtƒtjƒdS(N(tassertEqualR
R$t_SCHEME_KEYS(R)((s//usr/local/lib/python2.7/test/test_sysconfig.pyttest_get_path_namesVscCsatƒ}tƒ}t|dƒ}|jƒ}|jƒ|jƒ}|jƒ|j||ƒdS(N(RRR
RR+tsortR7(R)tschemetdefault_schemetwanted((s//usr/local/lib/python2.7/test/test_sysconfig.pyttest_get_pathsYs		

cCs9x2tD]*}x!t|D]}t||ƒ}qWqWdS(N(RR	(R)R;Rtres((s//usr/local/lib/python2.7/test/test_sysconfig.pyt
test_get_pathcs
cCs*tƒ}|j|tƒ|j|ƒdS(N(RtassertIsInstancetdictt
assertTrue(R)tcvars((s//usr/local/lib/python2.7/test/test_sysconfig.pyttest_get_config_varsis	cCsBdt_dt_dt_|jtƒdƒdt_dt_dt_|jtƒdƒdt_dt_dt_|jtƒdƒdt_d	t_d
t_|jd3ƒtj	t
ƒƒdt
ƒd<dt
ƒd<tj}z<dt_|jtƒdƒdt_|jtƒdƒWd|t_X|jd4ƒtj	t
ƒƒdt
ƒd<dt
ƒd<tj}z<dt_|jtƒdƒdt_|jtƒdƒWd|t_Xtj	t
ƒƒdt
ƒd<dt
ƒd<|jtƒdƒtj	t
ƒƒdt
ƒd<|jtƒdƒtj	t
ƒƒd t
ƒd<|jtƒd!ƒtj	t
ƒƒd"t
ƒd<|jtƒd#ƒtj	t
ƒƒd$t
ƒd<|jtƒd%ƒxLd5D]D}tj	t
ƒƒd)|ft
ƒd<|jtƒd*|fƒq»Wdt_d+t_d,t_|jd6ƒ|jtƒd2ƒdS(7Ntnts>2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)]twin32s>2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Amd64)]s	win-amd64s@2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Itanium)]swin-ia64tposixsU2.5 (r25:51918, Sep 19 2006, 08:49:13) 
[GCC 4.0.1 (Apple Computer, Inc. build 5341)]tdarwintDarwintmacziades8.11.1s]Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386tPowerPCs10.3tMACOSX_DEPLOYMENT_TARGETsF-fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypestCFLAGSiÿÿÿsmacosx-10.3-ppcIÿÿÿÿÿÿÿsmacosx-10.3-ppc64ti386smacosx-10.3-i386smacosx-10.3-x86_64s10.4sy-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3smacosx-10.4-fats|-arch x86_64 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3smacosx-10.4-intels†-arch x86_64 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3smacosx-10.4-fat3s’-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3smacosx-10.4-universals}-arch x86_64 -arch ppc64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3smacosx-10.4-fat64tppctx86_64tppc64sm-arch %s -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3smacosx-10.4-%ssV2.3.5 (#1, Jul  4 2007, 17:28:59) 
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]tlinux2tLinuxtaglaes2.6.21.1dedibox-r7s #1 Mon Apr 30 17:25:38 CEST 2007ti686s
linux-i686(RJRKs8.11.1s]Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386RL(RJRKs8.11.1s]Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386RO(RPRORQRR(RTRUs2.6.21.1dedibox-r7s #1 Mon Apr 30 17:25:38 CEST 2007RV(RRRRRR7RR1t_osx_supportt_remove_original_valuesRtmaxint(R)RYtarch((s//usr/local/lib/python2.7/test/test_sysconfig.pyttest_get_platformnsˆ												

			


			







			cCs,tjƒ}|jtjj|ƒ|ƒdS(N(R$tget_config_h_filenameRCRRR2(R)tconfig_h((s//usr/local/lib/python2.7/test/test_sysconfig.pyttest_get_config_h_filenameíscCsd	}|jtƒ|ƒdS(
NRFtnt_usertos2tos2_hometosx_framework_usert
posix_hometposix_prefixt
posix_user(RFR_R`RaRbRcRdRe(R7R(R)R=((s//usr/local/lib/python2.7/test/test_sysconfig.pyttest_get_scheme_namesñstwinsTest is not Windows compatiblecCsBtjƒ}|jtjj|ƒ|ƒ|jtjƒ|ƒdS(N(R$tget_makefile_filenameRCRRR2R7t_get_makefile_filename(R)R((s//usr/local/lib/python2.7/test/test_sysconfig.pyttest_get_makefile_filenameöscCs~ttdƒ}d„}tjjtjƒ}tjjtƒ}|||ƒz |j||ƒ||ƒƒWdt	|ƒXdS(NtsymlinkcSs1|ddg}tj|dtjƒ}|jƒS(Ns-cs0import sysconfig; print sysconfig.get_platform()tstdout(t
subprocesstPopentPIPEtcommunicate(tpythontcmdtp((s//usr/local/lib/python2.7/test/test_sysconfig.pyR,s	(
RRRtrealpathRt
executabletabspathRR7R(R)RkR,trealtlink((s//usr/local/lib/python2.7/test/test_sysconfig.pyttest_symlinkþs	
 cCsµtdƒ}tdƒ}tjtjk}x„d
D]|}t|dƒ}|r|jtjtjƒ}|jtjtjƒ}nt|dƒ}|j||j||d	ƒƒq1WdS(Ntbasetuserbasetstdlibt
platstdlibtpurelibtplatlibRdRei(R|R}R~R(RRtprefixtexec_prefixR	treplaceR7(R)RztusertadaptRtglobal_patht	user_path((s//usr/local/lib/python2.7/test/test_sysconfig.pyttest_user_similars
RIstest only relevant on MacOSXcCsntjƒ}tjjƒ}d|kr1|d=ntddƒ7}tjtj	ddgdtj
d|d|ƒ}WdQX|jƒd	jƒ}|j
d
ƒ}|jƒ}|j|d	ƒ|j||ƒtjjƒ}d|d<tjtj	ddgdtj
dtdƒd|ƒ}|jƒd	jƒ}|j
d
ƒ}|jƒ}|j|d	ƒ|j||ƒdS(NRMs	/dev/nulltws-cs1import sysconfig; print(sysconfig.get_platform())Rltstderrtenvisutf-8s10.1(R$RRR'RtopenRmRnRRuRoRptstriptdecodetwaitR7(R)tmy_platformRŠt
devnull_fpRst
test_platformtstatus((s//usr/local/lib/python2.7/test/test_sysconfig.pyttest_platform_in_subprocesss:
			
				(t__name__t
__module__RR.R1RR*R9R>R@RER[R^RftunittesttskipIfRRt
startswithRjRyR‡t
skipUnlessR“(((s//usr/local/lib/python2.7/test/test_sysconfig.pyRs"							
							cCsttƒdS(N(RR(((s//usr/local/lib/python2.7/test/test_sysconfig.pyt	test_mainLst__main__(t__doc__R–RRR5RmRRttest.test_supportRRRRR$RRRR	R
RRR
RRRWtTestCaseRRšR”(((s//usr/local/lib/python2.7/test/test_sysconfig.pyt<module>s"Fÿ:	

Zerion Mini Shell 1.0