Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/distutils/tests/test_dir_util.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��Qc@s�dZddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZddlm
Z
ddlmZddlmZdejejfd��YZd	�Zed
kr�ee��ndS(sTests for distutils.dir_util.i�N(tmkpathtremove_treetcreate_treet	copy_treetensure_relative(tlog(tsupport(trun_unittesttDirUtilTestCasecBsweZd�Zd�Zd�Zd�Zejej	j
d�d�d��Zd�Zd�Z
d	�Zd
�ZRS(cGs=t|�dkr)|jj||�n|jj|�dS(Ni(tlent_logstappend(tselftmsgtargs((s3/sys/lib/python2.7/distutils/tests/test_dir_util.pyt_logscCs�tt|�j�g|_|j�}tjj|d�|_tjj|jd�|_	tjj|d�|_
tj|_
|jt_dS(Ntdeeptheretdeep2(tsuperRtsetUpR
tmkdtemptostpathtjointroot_targetttargetttarget2Rtinfotold_logR(Rttmp_dir((s3/sys/lib/python2.7/distutils/tests/test_dir_util.pyRs	cCs#|jt_tt|�j�dS(N(RRRRRttearDown(R((s3/sys/lib/python2.7/distutils/tests/test_dir_util.pyR!scCs�t|jdd�g}|j|j|�t|jdd�t|jdd�d|jd|jg}|j|j|�g|_t|jdd�d|jg}|j|j|�dS(Ntverboseiiscreating %ss'removing '%s' (and everything under it)(RRtassertEqualR
RR(Rtwanted((s3/sys/lib/python2.7/distutils/tests/test_dir_util.pyt!test_mkpath_remove_tree_verbosity%s
	twins5This test is only appropriate for POSIX-like systems.cCs�tjd�}tj|�t|jd�|jtjtj|j�j�d|@�t|jd�|jtjtj|j�j�d|@�dS(Nii�im(	RtumaskRRR!tstattS_IMODEtst_modeR(RR%((s3/sys/lib/python2.7/distutils/tests/test_dir_util.pyttest_mkpath_with_custom_mode6s
'cCs�t|jdddgdd�|j|jg�t|jdd�d|jg}t|jdddgdd�|j|j|�t|jdd�dS(NtonettwotthreeR iscreating %si(RRR!R
R(RR"((s3/sys/lib/python2.7/distutils/tests/test_dir_util.pyttest_create_tree_verbosityCscCst|jdd�t|j|jdd�|j|jg�t|jdd�t|jdd�tj	j
|jd�}t|d�}z|jd�Wd|j
�Xd||jfg}t|j|jdd�|j|j|�t|jdd�t|jdd�dS(NR isok.txttwssome contentscopying %s -> %si(RRRRR!R
RRRRRtopentwritetclose(Rta_filetfR"((s3/sys/lib/python2.7/distutils/tests/test_dir_util.pyttest_copy_tree_verbosityPscCs�t|jdd�tjj|jd�}tjj|jd�}xB||fD]4}t|d�}z|jd�Wd|j�XqPWt|j|j	�|j
tj|j	�dg�t|j
dd�t|j	dd�dS(NR isok.txts
.nfs123abcR.ssome content(RRRRRR/R0R1RRR!tlistdirRR(RR2tnfs_fileR3tfh((s3/sys/lib/python2.7/distutils/tests/test_dir_util.pyt#test_copy_tree_skips_nfs_temp_fileshscCsntjdkr>|jtd�d�|jtd�d�n,|jtd�d�|jtd�d�dS(Nt/s	/home/fooshome/foos	some/pathsc:\home\foos
c:home\fooshome\foo(RtsepR!R(R((s3/sys/lib/python2.7/distutils/tests/test_dir_util.pyttest_ensure_relativezs
(t__name__t
__module__RRRR#tunittesttskipIftsystplatformt
startswithR)R-R4R8R;(((s3/sys/lib/python2.7/distutils/tests/test_dir_util.pyRs		
			
		cCs
tjt�S(N(R>t	makeSuiteR(((s3/sys/lib/python2.7/distutils/tests/test_dir_util.pyt
test_suite�st__main__(t__doc__R>RR&tshutilR@tdistutils.dir_utilRRRRRt	distutilsRtdistutils.testsRttest.test_supportRtTempdirManagertTestCaseRRDR<(((s3/sys/lib/python2.7/distutils/tests/test_dir_util.pyt<module>s(s	

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.