%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_genericpath.pyo

ó
Nêáac@s¡dZddlZddlmZddlZddlZddlZd„Zdejfd„ƒYZ	de	fd„ƒYZ
d	„Zed
kreƒndS(s<
Tests common to genericpath, macpath, ntpath and posixpath
iÿÿÿÿN(ttest_supportcCs)ytj|ƒWntk
r$nXdS(N(tostrmdirtOSError(tdirname((s1/usr/local/lib/python2.7/test/test_genericpath.pyt
safe_rmdirs
tGenericTestcBsqeZeZddddddddgZgZd„Zd	„Zd
„Zd„Z	d„Z
d
„Zd„ZRS(tcommonprefixtgetsizetgetatimetgetctimetgetmtimetexiststisdirtisfilec	Csixb|j|jD]P}|jtƒ9t|j|ƒƒ|jdj|jj|ƒƒ‚WdQXqWdS(Ns!{}.{}() did not raise a TypeError(	tcommon_attributest
attributestassertRaisest	TypeErrortgetattrt
pathmoduletfailtformatt__name__(tselftattr((s1/usr/local/lib/python2.7/test/test_genericpath.pyttest_no_arguments
cCs–|jj}|j|gƒdƒ|j|ddgƒdƒ|j|ddgƒdƒ|j|ddgƒdƒ|j|ddgƒd	ƒ|j|d
dgƒdƒ|j|d
d
gƒd
ƒdd
dddddddddg}xž|D]–}x|D]…}|||gƒ}|j|j|ƒƒ|j|j|ƒƒ||krt|ƒ}|j|||d!|||d!ƒqqWqøWdS(Nts/home/swenson/spams/home/swen/spams
/home/swens/home/swen/eggss/home/swen/shome:swenson:spamshome:swen:spams	home:swens:home:swen:spams:home:swen:eggss:home:swen:tabctXbcdtXbtXYtabcdtaXctabdtabtaXtabcXi(RRtassertEqualt
assertTruet
startswithtlentassertNotEqual(RRttestlistts1ts2tptn((s1/usr/local/lib/python2.7/test/test_genericpath.pyttest_commonprefix!s@	

cCszttjdƒ}z:|jdƒ|jƒ|j|jjtjƒdƒWd|jse|jƒntj	tjƒXdS(Ntwbtfooi(
topenRtTESTFNtwritetcloseR&RRtclosedtunlink(Rtf((s1/usr/local/lib/python2.7/test/test_genericpath.pyttest_getsizeKs

#	
cCsêttjdƒ}zª|jdƒ|jƒttjdƒ}|jdƒ|jƒttjdƒ}|jƒ}|jƒ|j|dƒ|j|jj	tjƒ|jj
tjƒƒWd|jsÕ|jƒntjtjƒXdS(NR1R2R#tbartrbtfoobar(
R3RR4R5R6treadR&tassertLessEqualRR
RR7R8(RR9td((s1/usr/local/lib/python2.7/test/test_genericpath.pyt	test_timeVs"




	
cCsÍ|j|jjtjƒtƒttjdƒ}zk|jdƒ|jƒ|j|jjtjƒt	ƒ|jt
ks›|j|jjtjƒt	ƒnWd|jƒs¸|jƒntjtjƒXdS(NR1R2(
tassertIsRRRR4tFalseR3R5R6tTruetgenericpathtlexistsR8(RR9((s1/usr/local/lib/python2.7/test/test_genericpath.pyttest_existsls


cCsø|j|jjtjƒtƒttjdƒ}z‰|jdƒ|jƒ|j|jjtjƒtƒt	j
tjƒt	jtjƒ|j|jjtjƒtƒt	j
tjƒWd|jƒsÖ|jƒntjtjƒttjƒXdS(NR1R2(RBRR
RR4RCR3R5R6RtremovetmkdirRDRR8R(RR9((s1/usr/local/lib/python2.7/test/test_genericpath.pyt
test_isdir{s


cCsø|j|jjtjƒtƒttjdƒ}z‰|jdƒ|jƒ|j|jjtjƒt	ƒt
jtjƒt
jtjƒ|j|jjtjƒtƒt
j
tjƒWd|jƒsÖ|jƒntjtjƒttjƒXdS(NR1R2(RBRRRR4RCR3R5R6RDRRHRIRR8R(RR9((s1/usr/local/lib/python2.7/test/test_genericpath.pyttest_isfileŒs


(
Rt
__module__RERRRRR0R:RARGRJRK(((s1/usr/local/lib/python2.7/test/test_genericpath.pyRs		*				t
CommonTestcBsùeZd$Zejdddddddddd	d
ddd
dddddddddddgZd„Zd„Zd„Ze	j
ejdƒd„ƒZ
d„Zd„Zejd„ƒZejd „ƒZe	jejd!kd"ƒd#„ƒZRS(%tcurdirtpardirtextseptseptpathseptdefpathtaltseptdevnulltnormcaset
splitdrivet
expandvarstnormpathtabspathtjointsplittsplitexttisabstbasenameRRFtislinktismountt
expandusertrealpathcCs8d}|jj|ƒ}|j||jj|ƒƒdS(Ns	FoO/./BaR(RRVR&(RR.((s1/usr/local/lib/python2.7/test/test_genericpath.pyt
test_normcase®scCsR|jj}|j|dƒdƒ|j|dƒdƒ|j|dƒdƒdS(Ns/foo/barRsfoo:bars:foo:bar(Rs/foo/bar(Rsfoo:bar(Rs:foo:bar(RRWR&(RRW((s1/usr/local/lib/python2.7/test/test_genericpath.pyttest_splitdrive´scCsa|jjdkr"|jdƒn|jj}tjƒ!}|jƒd|d<d|d<d|d<|j|dƒdƒ|j|d	ƒd
ƒ|j|dƒdƒ|j|d
ƒd
ƒ|j|dƒdƒ|j|dƒdƒ|j|dƒdƒ|j|dƒdƒ|j|dƒdƒ|j|dƒdƒ|j|dƒdƒWdQXdS(Ntmacpathsmacpath.expandvars is a stubR;R2tbaz1s{footbaz2s{foo}s$foo barsbar bars	${foo}bartbarbars	$[foo]bars$bar bars$?bars$foo}barsbar}bars${foos${{foo}}sbaz1}s$foo$foos$bar$bar(RRtskipTestRXRtEnvironmentVarGuardtclearR&(RRXtenv((s1/usr/local/lib/python2.7/test/test_genericpath.pyttest_expandvars»s&



sneed test_support.FS_NONASCIIcssˆjjdkr"ˆjdƒnˆjj‰‡‡fd†}tjƒ}tjƒ}|jƒtj	}|j
|ƒ}||d<d|||<|||ƒ|dd|ƒ|dd	|ƒ|d
|d|ƒ|d|d|ƒ|d
d|ƒ|||ƒ|dd|ƒ|dd|ƒ|d|d|ƒ|d|d|ƒ|dd|ƒWdQXdS(NRfsmacpath.expandvars is a stubcsˆjˆ|ƒ|ƒdS(N(R&(tvaluetexpected(RXR(s1/usr/local/lib/python2.7/test/test_genericpath.pytcheckÕstspamthams	$spam bars%s bars
${spam}bars%sbars${%s}barsham%sbars
$bar%s bars	$spam}bars%s}baru	$spam baru%s baru
${spam}baru%sbaru${%s}baruham%sbaru
$bar%s baru	$spam}baru%s}bar(RRRjRXtsystgetfilesystemencodingRRkRltFS_NONASCIItencode(RRqtencodingRmt	unonasciit	snonascii((RXRs1/usr/local/lib/python2.7/test/test_genericpath.pyttest_expandvars_nonasciiÐs.
	


cCsM|jd|jjdƒƒx*dD]"}|j|jj|ƒtƒq#WdS(NR2Rsfòòs/foosC:\(RR2sfòòs/foosC:\(tassertInRRZtassertIsInstancetstr(Rtpath((s1/usr/local/lib/python2.7/test/test_genericpath.pyttest_abspathìs
cCs |jd|jjdƒƒdS(NR2(R|RRc(R((s1/usr/local/lib/python2.7/test/test_genericpath.pyt
test_realpathóscCs1x*dD]"}|j|jj|ƒtƒqWdS(Nuu.u/u\u///foo/.//bar//(uu.u/u\u///foo/.//bar//(R}RRYtunicode(RR((s1/usr/local/lib/python2.7/test/test_genericpath.pyttest_normpath_issue5827ös
c	Cs´|jj}x$dD]}|j||ƒtƒqWd}y tjpHd}|j|ƒWnttfk
rrn>Xtj	|ƒ,x$d	D]}|j||ƒtƒqŠWWdQXdS(
Nuufuuufùùu/fuuuU:\uçwðtascii(uufuuufùùu/fuuuU:\(uufuuufùùu/fuuuU:\(
RRZR}R‚RtTESTFN_ENCODINGRwtAttributeErrortUnicodeEncodeErrorttemp_cwd(RRZRtunicwdt
fsencoding((s1/usr/local/lib/python2.7/test/test_genericpath.pyttest_abspath_issue3426üs

tdarwinsEMac OS X denies the creation of a directory with an invalid utf8 namecCs$tjdƒ|jƒWdQXdS(Nsçwð(RRˆR€(R((s1/usr/local/lib/python2.7/test/test_genericpath.pyttest_nonascii_abspathsN(RRLtNoneRRRRdReRntunittestt
skipUnlessRRvR{R€Rtrequires_unicodeRƒR‹tskipIfRttplatformR(((s1/usr/local/lib/python2.7/test/test_genericpath.pyRM¡s"					cCstjtƒdS(N(Rtrun_unittestR(((s1/usr/local/lib/python2.7/test/test_genericpath.pyt	test_mainst__main__(
t__doc__RttestRRRERtRtTestCaseRRMR•R(((s1/usr/local/lib/python2.7/test/test_genericpath.pyt<module>s	Žw	

Zerion Mini Shell 1.0