MCPcopy Index your code
hub / github.com/python/cpython / run

Method run

Lib/test/test_threadedtempfile.py:38–49  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

nothing calls this directly

Calls 3

print_excFunction · 0.90
waitMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected