%-bmSrSSKrSSKJr SSKJr SSKrSSKrSSKrSSK J r \R"SS9 Sr S r \R"5r"S S \R 5r"S S \R$5r\S:Xa\R*"5 gg)an 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. N)support)threading_helper) print_excT)module2c"\rSrSrSrSrSrSrg)TempFileGreedy"rcd[R"5Ul[R 5 [ [ 5H?n[R"S5nUR5 U=RS- sl MA g! U=RS- sl [URS9 Mq=f)Nzw+b)file) ioStringIOerrors startEventwaitrangeFILES_PER_THREADtempfile TemporaryFilecloseok_count error_countr)selfifs A/opt/alt/python313/lib64/python3.13/test/test_threadedtempfile.pyrunTempFileGreedy.run&s{kkm '(A #**51  " ) ,  A% t{{+s &B*B/)rN)__name__ __module__ __qualname____firstlineno__rrr__static_attributes__rr r "sKH #r'r cD\rSrSr\R "\SSS9S5rSrg)ThreadedTempFileTest4iF)sizememusedry_runc`[[5Vs/sH n[5PM nn[R"U[ R 5 SSS5 [SU55nUVs/sHNoUR(dM[UR5[URR55-PMP nnS[U5USRU54-nURU/U5 URU[[ -5 gs snf!,(df  N=fs snf)Nc38# UHoRv M g7f)N)r).0ts r 1ThreadedTempFileTest.test_main..:s-WWszErrors: errors %d ok %d %s )r NUM_THREADSr r start_threadsrsetsumrstrnamergetvaluelenjoin assertEqualr)rr+rthreadsokr1rmsgs r test_mainThreadedTempFileTest.test_main5s-2;-?@-?>#-?@  + +GZ^^ D E -W- -"5"amm9#aff+AHH$5$5$7 88" 5,s6{B IIf / S) [+;;<A D D5sD D-D+=D+ D(r&N) r!r"r#r$r bigmemtestr5rBr%r&r'rr)r)4s$ [5I =J =r'r)__main__)__doc__rtestr test.supportrunittestr threading tracebackrrequires_working_threadingr5rEventrThreadr TestCaser)r!mainr&r'rrQs ) ++48 __  #Y%%#$ =8,, = z MMOr'