%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/test/ |
Current File : //usr/local/lib/python2.7/test/test_threadedtempfile.pyc |
ó Nêáac @ sÏ d Z d Z d Z d d l Z d d l m Z m Z m Z e d ƒ Z d d l Z d d l Z d d l m Z e j ƒ Z d e j f d „ ƒ YZ d e j f d „ ƒ YZ d „ Z e d k rË e ƒ n d S( 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. i i2 iÿÿÿÿN( t start_threadst run_unittestt import_modulet threading( t print_exct TempFileGreedyc B s e Z d Z d Z d „ Z RS( i c C s‰ t j ƒ | _ t j ƒ xi t t ƒ D][ } y t j d ƒ } | j ƒ Wn&