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

Method test_main

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

Source from the content-addressed store, hash-verified

51
52class ThreadedTempFileTest(unittest.TestCase):
53 def test_main(self):
54 threads = [TempFileGreedy() for i in range(NUM_THREADS)]
55 with threading_helper.start_threads(threads, startEvent.set):
56 pass
57 ok = sum(t.ok_count for t in threads)
58 errors = [str(t.name) + str(t.errors.getvalue())
59 for t in threads if t.error_count]
60
61 msg = "Errors: errors %d ok %d\n%s" % (len(errors), ok,
62 '\n'.join(errors))
63 self.assertEqual(errors, [], msg)
64 self.assertEqual(ok, NUM_THREADS * FILES_PER_THREAD)
65
66if __name__ == "__main__":
67 unittest.main()

Callers

nothing calls this directly

Calls 7

TempFileGreedyClass · 0.85
strFunction · 0.85
lenFunction · 0.85
sumFunction · 0.50
getvalueMethod · 0.45
joinMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected