Back to index

python3.2  3.2.2
Public Member Functions
test.test_threadedtempfile.ThreadedTempFileTest Class Reference

List of all members.

Public Member Functions

def test_main

Detailed Description

Definition at line 47 of file test_threadedtempfile.py.


Member Function Documentation

Definition at line 48 of file test_threadedtempfile.py.

00048 
00049     def test_main(self):
00050         threads = []
00051         thread_info = threading_setup()
00052 
00053         for i in range(NUM_THREADS):
00054             t = TempFileGreedy()
00055             threads.append(t)
00056             t.start()
00057 
00058         startEvent.set()
00059 
00060         ok = 0
00061         errors = []
00062         for t in threads:
00063             t.join()
00064             ok += t.ok_count
00065             if t.error_count:
00066                 errors.append(str(t.name) + str(t.errors.getvalue()))
00067 
00068         threading_cleanup(*thread_info)
00069 
00070         msg = "Errors: errors %d ok %d\n%s" % (len(errors), ok,
00071             '\n'.join(errors))
00072         self.assertEqual(errors, [], msg)
00073         self.assertEqual(ok, NUM_THREADS * FILES_PER_THREAD)

Here is the call graph for this function:


The documentation for this class was generated from the following file: