MCPcopy Index your code
hub / github.com/RustPython/RustPython / TempFileGreedy

Class TempFileGreedy

Lib/test/test_threadedtempfile.py:34–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33
34class TempFileGreedy(threading.Thread):
35 error_count = 0
36 ok_count = 0
37
38 def run(self):
39 self.errors = io.StringIO()
40 startEvent.wait()
41 for i in range(FILES_PER_THREAD):
42 try:
43 f = tempfile.TemporaryFile("w+b")
44 f.close()
45 except:
46 self.error_count += 1
47 print_exc(file=self.errors)
48 else:
49 self.ok_count += 1
50
51
52class ThreadedTempFileTest(unittest.TestCase):

Callers 1

test_mainMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_mainMethod · 0.68