MCPcopy Index your code
hub / github.com/nodejs/node / testException

Method testException

deps/v8/tools/testrunner/local/pool_test.py:39–52  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

37 self.assertEqual(set(range(0, 10)), results)
38
39 def testException(self):
40 results = set()
41 pool = DefaultExecutionPool()
42 pool.init(3)
43 with self.assertRaises(Exception):
44 for result in pool.imap_unordered(Run, [[x] for x in range(0, 12)]):
45 if result.heartbeat:
46 # Any result can be a heartbeat due to timings.
47 continue
48 # Item 10 will not appear in results due to an internal exception.
49 results.add(result.value)
50 expect = set(range(0, 12))
51 expect.remove(10)
52 self.assertEqual(expect, results)
53
54 def testAdd(self):
55 results = set()

Callers

nothing calls this directly

Calls 7

initMethod · 0.95
imap_unorderedMethod · 0.95
addMethod · 0.65
setFunction · 0.50
rangeFunction · 0.50
removeMethod · 0.45

Tested by

no test coverage detected