%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/plesk/python/2.7/lib64/python2.7/test/
Upload File :
Create Path :
Current File : //proc/self/root/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyo

�
5}�ac@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZddlm
Z
ejZdfd��YZdefd��YZdejfd	��YZd
�Zedkre�ndS(i����N(tsupport(t
script_helpertClassicClasscBseZRS((t__name__t
__module__(((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyRst
NewStyleClasscBseZRS((RR(((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyRstTestSupportcBsveZd�Zd�Zd�Zejd�d��Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zejeed�d�d��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d �Z$d!�Z%d"�Z&d#�Z'd$�Z(d%�Z)d&�Z*RS('cCs*tjd�|jtjtjd�dS(Ntftplibtfoo(Rt
import_moduletassertRaisestunittesttSkipTest(tself((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_import_modules
cCstjd�dS(NR(Rtimport_fresh_module(R
((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_import_fresh_modulescCs!|jtj|d�|j�|jtjtj|d�|jtjd��tjtd�WdQX|jtjd��tjtd�WdQX|jtjd��tjt�d�WdQX|jtjd��tjt	d�WdQX|jtjd��tjt	�d�WdQXdS(Nttest_get_attributeRRRR(
tassertEqualRt
get_attributeRR
RRtassertRaisesRegexpRR(R
((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyR!s
sfailing buildbotscCs|jtj�tj�dS(N(RRtget_original_stdouttsyststdout(R
((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_get_original_stdout0scCsCddl}|jdtj�tjd�|jdtj�dS(Ni����tsched(RtassertInRtmodulesRtunloadtassertNotIn(R
R((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_unload4s
cCsOttd��}WdQXtjt�|jtjjt��tjt�dS(Ntw(topentTESTFNRtunlinktassertFalsetostpathtexists(R
tf((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_unlink:s

cCsqtjd}tjj|d�}tj|�tj|�tj|�|jtjj|��tj	tdd��tj|�WdQXtj|�tj|�tj
|tjtj
B�tj	tdd��tj|�WdQX|jtjj|��tj|�tj|�tj
|d�tj	tdd��tj|�WdQX|jtjj|��dS(Ntdtsubdirtverbosei(RR!R$R%tjointmkdirtrmtreeR#R&t	swap_attrtchmodtstattS_IRUSRtS_IXUSR(R
tdirpatht
subdirpath((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_rmtreeAs(







cCs�td}t|d��}|jd�WdQXtjjdtj�zCtt�}|j	ttj
�tjt�|j
ttj
�Wdtjd=tj|�tjd�XdS(Ns.pytwtsfoo = 1
it__pycache__(R!R twriteRR%tinsertR$tcurdirt
__import__RRRtforgetRR"R.(R
tmod_filenameR'tmod((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_forgetYs



cCs0tj�}|jtjdf�|j�dS(Ni(tsockettbindRtHOSTtclose(R
ts((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt	test_HOSTiscCs<tj�}tj�}|jtj|f�|j�dS(N(Rtfind_unused_portRARBRCRD(R
tportRE((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_find_unused_portnscCs4tj�}tj|�|jd�|j�dS(Ni(RARt	bind_porttlistenRD(R
RE((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_bind_portts

cCs�tj�}tjj|�}z�tjj|d�}|jtjj|��tj	|��0}|j
||�|jtjj|��WdQX|jtjj|��Wdtj|�XdS(s8Test that temp_dir() creates and destroys its directory.ttempN(
ttempfiletmkdtempR$R%trealpathR,R#tisdirRttemp_dirRt
assertTrueR.(R
t
parent_dirR%t	temp_path((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt
test_temp_dir|scCsKtj�� }|jtjj|��WdQX|jtjj|��dS(sTest passing no path.N(RRRRSR$R%RQR#(R
RU((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_temp_dir__path_none�scCs�d�}tj�}tjj|�}zq|jtjj|��|jt��}||�WdQX|j	|j
jtj�|jtjj|��Wdt
j|�XdS(s-Test passing a directory that already exists.cSs(tj|��}td��WdQXdS(Nsshould not get here(RRRt	Exception(R%RU((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt
call_temp_dir�sN(RNROR$R%RPRSRQR
tOSErrorRt	exceptionterrnotEEXISTtshutilR.(R
RYR%tcm((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt*test_temp_dir__existing_dir__quiet_default�s	cCs�tj�}tjj|�}z�tj��Z}tj|dt��}|j	||�WdQXg|j
D]}t|j�^qh}WdQX|j
tjj|��Wdtj|�Xd|g}|j	||�dS(s=Test passing a directory that already exists with quiet=True.tquietNs+tests may fail, unable to create temp dir: (RNROR$R%RPRtcheck_warningsRRtTrueRtwarningststrtmessageRSRQR^R.(R
R%trecorderRURRdtexpected((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt'test_temp_dir__existing_dir__quiet_true�s+
tforkstest requires os.forkcCstjdtjd��dS(s?Test that a forked child process does not remove the directory.s-cs�
            import os
            from test import support
            with support.temp_cwd() as temp_path:
                pid = os.fork()
                if pid != 0:
                    # parent process (child has pid == 0)

                    # wait for the child to terminate
                    (pid, status) = os.waitpid(pid, 0)
                    if status != 0:
                        raise AssertionError("Child process failed with exit "
                                             "status indication "
                                             "0x{:x}.".format(status))

                    # Make sure that temp_path is still present. When the child
                    # process leaves the 'temp_cwd'-context, the __exit__()-
                    # method of the context must not remove the temporary
                    # directory.
                    if not os.path.isdir(temp_path):
                        raise AssertionError("Child removed temp_path.")
        N(Rtassert_python_okttextwraptdedent(R
((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_temp_dir__forked_child�scCsytj�}tj��E}tj|��-}|j||�|jtj�|�WdQXWdQX|jtj�|�dS(N(R$tgetcwdRRRt
change_cwdR(R
toriginal_cwdRUtnew_cwd((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_change_cwd�s"c
Cs�tj�}d�}tj��W}tjj|d�}|jt��}||�WdQX|j|j	j
t
j�WdQX|jtj�|�dS(s&Test passing a non-existent directory.cSs(tj|��}td��WdQXdS(Nsshould not get here(RRpRX(R%Rr((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pytcall_change_cwd�stdoes_not_existN(R$RoRRRR%R,R
RZRR[R\tENOENT(R
RqRtRTtnon_existent_dirR_((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt!test_change_cwd__non_existent_dir�s	c	Cs�tj�}tj���}tjj|d�}tj��p}tj|dt��-}|j	||�|j	tj�|�WdQXg|j
D]}t|j�^q�}WdQXWdQXd|g}|j	||�dS(s6Test passing a non-existent directory with quiet=True.RuRaNs)tests may fail, unable to change CWD to: (
R$RoRRRR%R,RbRpRcRRdReRf(	R
RqRTtbad_dirRgRrRRdRh((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt-test_change_cwd__non_existent_dir__quiet_true�s1
c	Cs~td}tj��K}tjd|dt��WdQXg|jD]}t|j�^qB}WdQX|j|d|g�dS(s0Check the warning message when os.chdir() fails.t_does_not_existR%RaNs)tests may fail, unable to change CWD to: (	R!RRbRpRcRdReRfR(R
R%RgRtmessages((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_change_cwd__chdir_warning�s
+cCsztj�}tjdt��'|jtjjtj��t�WdQX|jtjj	t��|jtj�|�dS(Ntname(
R$RoRttemp_cwdR!RR%tbasenameR#R&(R
there((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt
test_temp_cwd	s
(cCs�tj�}tjdd��F}|j||�|jtjj|��|j	tj�|�WdQX|j	tj�|�dS(s Test passing None to temp_cwd().R~N(
R$RoRRtNonetassertNotEqualRSR%RQR(R
RqRr((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_temp_cwd__name_nonescCs2|jtjidd6dd6dd6�d�dS(Niiis{1: 1, 2: 2, 3: 3}(RRtsortdict(R
((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt
test_sortdictscCsQtj�}|jt��}tj|d�WdQX|j|jjtj	�dS(NR(
Rtmake_bad_fdR
RZR$R9RR[R\tEBADF(R
tfdR_((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_make_bad_fdscCsFtj|ddddd�|jt��tj|d�WdQXdS(Ns	def classtlinenoitoffseti	sx=1(Rtcheck_syntax_errorR
tAssertionError(R
((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_check_syntax_error#scCs3ddl}tjd��|jd�WdQXdS(Ni����tasyncore(t	importlibRtCleanImportR	(R
R�((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_CleanImport(scCsitjdd��+|jdtj�|jdtj�WdQX|jdtj�|jdtj�dS(NRtbar(Rt
DirsOnSysPathRRR%R(R
((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_DirsOnSysPath-s
cCs4tj��}dGHWdQX|j|j�d�dS(Nthelloshello
(Rtcaptured_stdoutRtgetvalue(R
R((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_captured_stdout4scCs<tj��}tjdIJWdQX|j|j�d�dS(NR�shello
(Rtcaptured_stderrRtstderrRR�(R
R�((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_captured_stderr9scCsLtj��*}|jd�|jd�t�}WdQX|j|d�dS(Nshello
iR�(Rtcaptured_stdinR9tseekt	raw_inputR(R
tstdintcaptured((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_captured_stdin>s


cCstj�dS(N(Rt
gc_collect(R
((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_gc_collectFscCs|jtj�t�dS(N(tassertIsInstanceRtpython_is_optimizedtbool(R
((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_python_is_optimizedIscCs	ddd��Y}|�}d|_tj|dd��*}|j|jd�|j|d�WdQX|j|jd�tj|dd��'}|j|jd�|j|�WdQX|jt|d��tj|dd��|`WdQX|jt|d��dS(NtObjcBseZRS((RR(((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyR�Msitxity((R�RR/RR�tassertIsNoneR#thasattr(R
R�tobjR�R�((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_swap_attrLs		cCs�idd6}tj|dd��+}|j|dd�|j|d�WdQX|j|dd�tj|dd��(}|j|dd�|j|�WdQX|jd|�tj|dd��|d=WdQX|jd|�dS(NiR�iR�(Rt	swap_itemRR�R(R
tDR�R�((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_swap_item]s

cCs�dd
d��Y}|d�}|d�}tjtdd��Ctjg�|jtj|��|jtj|��tjd�|jtj|��|jtj|��tj|j�g�|jtj|��|jtj|��tjdg�|jtj|��|jtj|��tjdg�|jtj|��|jtj|��tjdg�|jtj|��tjd	g�|jtj|��tjd
g�|jtj|��|jtj|��tj|j�|j�g�|jtj|��|jtj|��tjddg�|jtj|��|jtj|��WdQXdS(NtTestcBseZd�Zd�ZRS(cSs
||_dS(N(ttest_id(R
R�((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt__init__mscSs|jS(N(R�(R
((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pytidps(RRR�R�(((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyR�ls	s"test.test_os.FileTests.test_accesss'test.test_os.Win32ErrorTests.test_chdirt_match_test_functtest_osstest_*t	filetestst	FileTestss*test_os.*.test_*ttest_accesst	DONTMATCH((RR/R�tset_match_testsRSt
match_testR�R#(R
R�R�t
test_chdir((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyttest_match_testks@

cCsZtj�}tjttj�}ztj�}Wdtj|�X|j||d�dS(Ni(Rtfd_countR$R t__file__tO_RDONLYRDR(R
tstartR�tmore((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt
test_fd_count�s(+RRRRRRtskipRRR(R6R@RFRIRLRVRWR`Rit
skipUnlessR�R$RnRsRxRzR}R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyRsH														$	
																			9cCstg}tj|�dS(N(RRtrun_unittest(ttests((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt	test_main�s	t__main__(R�R^R1RR$RRARNRlR\ttestRttest.supportRR!RtobjectRtTestCaseRR�R(((s?/opt/plesk/python/2.7/lib64/python2.7/test/test_test_support.pyt<module>s&	��	

Zerion Mini Shell 1.0