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: 18.117.12.30
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_posixpath.pyo
�
?��cc@sddlZddlmZmZddlmZddlZddlZddlZddlmZm	Z	m
Z
mZyddlZWne
k
r�eZnXe	ej�Zd�Zd�Zdejfd��YZd	ejfd
��YZd�Zedkre�ndS(
i����N(ttest_supportttest_genericpath(R(trealpathtabspathtdirnametbasenamecCs/dtk}d}|tj|�|�g|S(s�
    On Windows, posixpath.abspath still returns paths with backslashes
    instead of posix forward slashes. If this is the case, several tests
    fail, so skip them.
    s\s'ABSTFN is not a posix path - tests fail(tABSTFNtunittesttskip(ttesttfound_backslashtmsg((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt!skip_if_ABSTFN_contains_backslashscCs)ytj|�Wntk
r$nXdS(N(tostrmdirtOSError(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt
safe_rmdirs
t
PosixPathTestcBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zejeed�d�d��Zejed$kd�d��Zejed$kd�d��Zd�Zd�Zd�Zd�Zed��Zed��Z eed�r}d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d �Z'nd!�Z(eje)j*d"�d#��Z+RS(%cCs|j�dS(N(ttearDown(tself((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pytsetUp&scCsCx<dddgD]+}tjtj|�ttj|�qWdS(Ntt1t2(RtunlinktTESTFNR(Rtsuffix((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyR)scCsd|jtjdddd�d�|jtjddd�d�|jtjddd	�d
�dS(Ns/footbars/bartbazs/bar/bazs/foo/bar/bazs/foo/sbar/sbaz/s
/foo/bar/baz/(tassertEqualt	posixpathtjoin(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt	test_join.s"cCs�|jtjd�d�|jtjd�d�|jtjd�d
�|jtjd�d�|jtjd	�d�dS(Ns/foo/bars/fooRt/Rtfoos////foos////s
//foo//bars//foo(s/fooR(R!R(RR"(s////R"(s//fooR(RRtsplit(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt
test_split3s
cCs�|jtj|�||f�|jtjd|�d||f�|jtjd|�d||f�|jtjd|�d||f�|jtjd|�d||f�|jtj|d�||ddf�dS(NR!sabc/sabc.def/s	/abc.def/R(RRtsplitext(Rtpathtfilenametext((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pytsplitextTest:s''''cCs�|jddd�|jddd�|jddd�|jdd	d
�|jddd�|jd
d
d�|jddd�|jddd�|jddd�|jddd�|jddd�|jddd�dS(Nsfoo.barR"s.barsfoo.boo.barsfoo.boosfoo.boo.biff.barsfoo.boo.biffs.csh.rcs.cshs.rctnodotsRs.cshrcs...manydotss...manydots.exts.extt.s..s........(R)(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt
test_splitextBscCs�|jtjd�t�|jtjd�t�|jtjd�t�|jtjd�t�|jtjd�t�dS(NRR!s/foos/foo/barsfoo/bar(tassertIsRtisabstFalsetTrue(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt
test_isabsPs
cCs�|jtjd�d�|jtjd�d�|jtjd�d�|jtjd�d�|jtjd�d�dS(Ns/foo/barRR!RR"s////foos
//foo//bar(RRR(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt
test_basenameWs
cCs�|jtjd�d�|jtjd�d�|jtjd�d�|jtjd�d�|jtjd�d	�dS(
Ns/foo/bars/fooR!R"Rs////foos////s
//foo//bars//foo(RRR(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_dirname^s
cCsV|jtjtjd�t�ttjdd�}z�|jd�|j�|jtjtjd�t�t	t
d�r4t
jtjdtjd�|jtjtjd�t�t
j
tjd�|jtjtjd�t�|jtjtjd�t�|jtjtjd�t�nWd|j�sQ|j�nXdS(NRtwbR"tsymlinkR(R-RtislinkRRR/topentwritetclosethasattrR
R5R0tremovetexiststlexists(Rtf((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_islinkes 

    'cCsAttjdd�}z
|jd�|j�|jtjtjdtjd�t�t	t
d�rt
jtjdtjd�|jtjtjdtjd�t�t
jtjd�ttjdd�}|jd�|j�|jtjtjdtjd�t
�nWd|j�s<|j�nXdS(NRR4R"R5RR(R7RRR8R9R-RtsamefileR0R:R
R5R;R/(RR>((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt
test_samefilews:










cCswttjdd�}z@|jd�|j�|jtjtj	tjd�tj	tjd��t
�ttd�rUtjtjdtjd�|jtjtj	tjd�tj	tjd��t
�tj
tjd�ttjdd�}|jd�|j�|jtjtj	tjd�tj	tjd��t�nWd|j�sr|j�nXdS(NRR4R"R5RR(R7RRR8R9R-RtsamestatR
tstatR0R:R5R;R/(RR>((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt
test_samestat�s6



cCs|jtjd�t�dS(NR!(R-RtismountR0(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_ismount�scCsU|jtjt�t�z*tjt�|jtjt�t�Wdtt�XdS(N(R-RRERR/R
tmkdirR(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_ismount_non_existent�s

R5s*Requires functional symlink implementationcCsBz-tjdt�|jtjt�t�Wdtjt�XdS(NR!(R
R5RR-RRER/R(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_ismount_symlinks�ssTest requires posix modulecCsItj}d�}z&|t_|jtjt�t�Wd|t_XdS(NcSsRd}d}|tkr'd}d}ntjd||dddddddf
�S(Nii(Rtposixtstat_result(R&tst_inotst_dev((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt
fake_lstat�s	(R
tlstatR-RRERR0(Rt
save_lstatRN((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_ismount_different_device�s			cCsItj}d�}z&|t_|jtjt�t�Wd|t_XdS(NcSs|d}d}|jt�r6|tkr6td��n|tkrQd}d}ntjd||dddddddf
�S(Nis!Fake [Errno 13] Permission deniedi(t
startswithRRRJRK(R&RLRM((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyRN�s	(R
ROR-RRERR0(RRPRN((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt#test_ismount_directory_not_readable�s			cCs|jtjd�d�dS(NR"(RRt
expanduser(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_expanduserscCs�tj���}d|d<|jtjd�d�d|d<|jtjd�d�xcdD][}||d<|jtjd�d�|jtjd	�d�|jtjd
�d�q\WWdQXdS(
Ns/home/victortHOMEt~s
/home/victor/R!Rs//s///s~/s~/foos/foo(R!Rs//s///(tsupporttEnvironmentVarGuardRRRT(Rtenvthome((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_expanduser_home_envvar
s



cCsitjd�}|jtjd�t�tjd�dkrf|jtjd�dtjd��n|jtjd�t�|jtjd�t�tj���}|d=|jt	j
��j}|jd�p�d}|jtjd�|�d�}tj
|d	|��Ktj
|d
|��/x'd
D]}|jtj|�|�q0WWdQXWdQXWdQXdS(Ntpwds~/RWR!s~root/s~foo/RVcWs
t�dS(N(tKeyError(targs((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pytraise_keyerror4stgetpwuidtgetpwnams~/.locals
~vstinner/(RWs~/.locals
~vstinner/(RXt
import_moduletassertIsInstanceRRTtstrRRYRaR
tgetuidtpw_dirtrstript	swap_attr(RR]RZR[R`R&((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_expanduser_pwds$	
cCs�|jtjd�d�|jtjd�d�|jtjd�d�|jtjd�d�|jtjd�d�|jtjd�d	�|jtjd
�d�dS(NRR+R!s//s///s///foo/.//bar//s/foo/bars///foo/.//bar//.//..//.//bazs/foo/bazs///..//./foo/.//bar(RRtnormpath(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt
test_normpath<scCsh|jtd�tj��|jtd�tj��|jtdjdgd��tj��dS(NR+s./.R!id(RRR
tgetcwdR(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_realpath_curdirEscCst|jtd�ttj���|jtd�tttj����|jtdjdgd��d�dS(Ns..s../..R!id(RRRR
RmR(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_realpath_pardirKs"(cCsGz2tjtdt�|jtt�td�Wdtjt�XdS(NR(R
R5RRRRR(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_realpath_basicRscCs�z0tjtt�|jtt�t�tjtdtd�tjtdtd�|jttd�td�|jttd�td�|jttd�td�|jttd�tt��|jttd�tt�d�tjtdtd�|jttd	tt�d�td�|jttd	tt�d�td�tjtt�d
td�|jttd�td
�tjdttt��d
tt�dtd�|jttd�td�tjtt���!|jttt��t�WdQXWdt	j
t�t	j
td�t	j
td�t	j
td�t	j
td�t	j
td�XdS(NRRs1/xs1/..s1/../xs/xtxtys1/../sa/btas../R!tc(R
R5RRRRRRXt
change_cwdRR(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_realpath_symlink_loopsZs8 $!!0&
cCs�z]tjt�tjdtt�td�tjdtd�|jttd�t�Wdtjtd�tjtd�t	t�XdS(Ns../s/selfsself/self/selfs/link(
R
RGRR5RRRRRR(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt(test_realpath_repeated_indirect_symlinks�s
cCsd}z�tjt�xDt|�D]6}tjdjd|gd�td|d�q#Wtjdtd�|jttd|�t�tj	t��|jtd|�t�WdQXWdx-t|d�D]}t
jtd|�q�Wtt�XdS(Ni
R!s%ds/%diR+s/0(
R
RGRtrangeR5RRRRXRuRRR(Rtdepthti((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_realpath_deep_recursion�s
4$cCs�zntjt�tjtd�tjtdtd�tjtd��|jtd�td�WdQXWdtj	td�t
td�t
t�XdS(Ns/ys/kRss/y/a(R
RGRR5RXRuRRRRR(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_realpath_resolve_parents�s
$cCs�z�tjt�tjtd�tjtd�tjtdtd�|jttd�td�tjtt���)|jtt	t�d�td�WdQXWdt
jtd�ttd�ttd�tt�XdS(Ns/ks/k/ys/link-ys
/link-y/..(
R
RGRR5RRRXRuRRRRR(R((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt(test_realpath_resolve_before_normalizing�s
cCs�z�tjt�tjtd�tjttd�tjtt���Itt�}|jt	|d�t�|jt	|d�td�WdQXWdt
jtd�ttd�tt�XdS(Ns/ktlinkslink/k(
R
RGRR5RXRuRRRRRRR(Rtbase((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_realpath_resolve_first�s
(cCsFtjd�}t_ztjjtj��d}|jttjd�|jtjd�d�|jtjtj	d��d�|jtjd�d�|jtjd�d�|jtjdd�d|d	�|jtjdd
�d|d�|jtjdd�d
�|jtjdd�d�|jtjdd�d�|jtjdd�d�|jtjdd�d�|jtjdd�d�|jtjdd�d�|jtjdd�d�|jtjdd�d�|jtjd	d	�d�|jtjdd�d�Wd|t_XdS(NcSsdS(Ns/home/user/bar((((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt<lambda>�Ri����RRssa/bs../a/bs../bs../s/as../cs/a/bsb/cs../../aR+s/foo/bar/bats/x/y/zs../../../foo/bar/bats/foo/bartbatR!sfoo/bar/bats../../..s/xs../foo/bar/bats
../../../x(
R
RmR&R#tassertRaisest
ValueErrorRtrelpathRR(Rtreal_getcwdtcurdir((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_relpath�s,"$$ sneed test_support.FS_NONASCIIcCs�tj�}tj}|j|�}|s:|jd�ntj��@}|j�d|||<|jt	j
d|�d|�WdQXdS(NsNeeds non-ASCII word charactersRu$%s baru	baz%s bar(tsystgetfilesystemencodingRtFS_NONASCIItencodetskipTestRYtclearRRt
expandvars(Rtencodingt
uwnonasciit
swnonasciiRZ((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyttest_expandvars_nonascii_word�s	
N(,t__name__t
__module__RRR R$R)R,R1R2R3R?RARDRFRHRt
skipUnlessR:R
RItskipIfRJtNoneRQRSRUR\RjRlRRnRoRpRvRwR{R|R}R�R�RR�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyR$sD											+	'				!!			#				'					tPosixCommonTestcBs eZeZddddgZRS(R�R@tsameopenfileRB(R�R�Rt
pathmodulet
attributes(((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyR�scCstjtt�dS(N(Rtrun_unittestRR�(((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt	test_mainst__main__(RR	RRRXRR
R�RRRRRJtImportErrorR�RRRRtTestCaseRt
CommonTestR�R�R�(((s:/usr/local/python-2.7/lib/python2.7/test/test_posixpath.pyt<module>s&"

	
	��	
© 2025 GrazzMean