KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21573/task/21573/root/usr/lib/python2.4/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/task/21573/root/usr/lib/python2.4/test/test_threadedtempfile.pyo
mň
‚=5Dc@sdZdZdZdkZdkZdklZdkZdkl	Z	dk
Z
eiƒZdei
fd„ƒYZd„Zed	jodkZdkZeieid
dƒ\ZZxNeD]F\ZZedjoeeƒZqĂed
joeeƒZqĂqĂWeƒndS(sÚ
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.  Run the test alone to boost either
via cmdline switches:

-f  FILES_PER_THREAD (int)
-t  NUM_THREADS (int)
ii2N(s
TestFailed(s	print_exctTempFileGreedycBstZdZdZd„ZRS(NicCs‰tiƒ|_tiƒxittƒD][}yti	dƒ}|iƒWn&|id7_t
d|iƒq&X|id7_q&WdS(Nsw+bitfile(tStringIOtselfterrorst
startEventtwaittrangetFILES_PER_THREADtittempfilet
TemporaryFiletftcloseterror_countt	print_exctok_count(RR	R((t0/usr/lib/python2.4/test/test_threadedtempfile.pytrun$s

(t__name__t
__module__RRR(((RR scCsńg}dGHx4ttƒD]&}tƒ}|i|ƒ|iƒqWdGHti	ƒdGHd}}x^|D]V}|iƒ||i
7}||i7}|io"d|iƒ|iiƒfGHqgqgWd||f}|GH|ot|ƒ‚ndS(NtCreatingtStartingtReapingis
%s errors:
%ssDone: errors %d ok %d(tthreadsRtNUM_THREADSR	RtttappendtstartRtsettokRtjoinRRtgetNametgetvaluetmsgt
TestFailed(RRR	RRR"((Rt	test_main1s,
	






&t__main__ist:f:s-fs-t(t__doc__RRtthreadt	threadingttest.test_supportR#Rt	tracebackRR
tEventRtThreadRR$Rtsystgetopttargvtoptstargstotvtint(RR
R1RR'RRRR3R2R-R(R$RR#R.R0((Rt?s*		
	
		




Anon7 - 2021