Back to index

python3.2  3.2.2
Classes | Functions | Variables
test.test_threadedtempfile Namespace Reference


class  TempFileGreedy
class  ThreadedTempFileTest


def test_main


int NUM_THREADS = 20
tuple threading = import_module('threading')
tuple startEvent = threading.Event()

Detailed Description

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.

Function Documentation

Definition at line 74 of file

00075 def test_main():
00076     run_unittest(ThreadedTempFileTest)

Here is the call graph for this function:

Variable Documentation

Definition at line 17 of file

Definition at line 16 of file

Definition at line 27 of file

Definition at line 22 of file