Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.17.165.240
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_genericpath.pyo
�
?��cc@s�dZddlZddlmZddlZddlZddlZd�Zdejfd��YZ	de	fd��YZ
d	�Zed
kr�e�ndS(s<
Tests common to genericpath, macpath, ntpath and posixpath
i����N(ttest_supportcCs)ytj|�Wntk
r$nXdS(N(tostrmdirtOSError(tdirname((s</usr/local/python-2.7/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((s</usr/local/python-2.7/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((s</usr/local/python-2.7/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((s</usr/local/python-2.7/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((s</usr/local/python-2.7/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((s</usr/local/python-2.7/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((s</usr/local/python-2.7/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((s</usr/local/python-2.7/lib/python2.7/test/test_genericpath.pyttest_isfile�s


(
Rt
__module__RERRRRR0R:RARGRJRK(((s</usr/local/python-2.7/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.((s</usr/local/python-2.7/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((s</usr/local/python-2.7/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((s</usr/local/python-2.7/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(s</usr/local/python-2.7/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((RXRs</usr/local/python-2.7/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((s</usr/local/python-2.7/lib/python2.7/test/test_genericpath.pyttest_abspath�s
cCs |jd|jjd��dS(NR2(R|RRc(R((s</usr/local/python-2.7/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((s</usr/local/python-2.7/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((s</usr/local/python-2.7/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((s</usr/local/python-2.7/lib/python2.7/test/test_genericpath.pyttest_nonascii_abspathsN(RRLtNoneRRRRdReRntunittestt
skipUnlessRRvR{R�R�trequires_unicodeR�R�tskipIfRttplatformR�(((s</usr/local/python-2.7/lib/python2.7/test/test_genericpath.pyRM�s"					cCstjt�dS(N(Rtrun_unittestR(((s</usr/local/python-2.7/lib/python2.7/test/test_genericpath.pyt	test_mainst__main__(
t__doc__R�ttestRRRERtRtTestCaseRRMR�R(((s</usr/local/python-2.7/lib/python2.7/test/test_genericpath.pyt<module>s	�w	
© 2025 GrazzMean