Commit 6159c577 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[test] Fix pool unittest

That was forgotten in:
https://codereview.chromium.org/1652003002

BUG=v8:5861
NOTRY=true
TBR=tandrii@chromium.org

Change-Id: I259539e5827a81bc8e22c44a8a5e374a0329c7af
Reviewed-on: https://chromium-review.googlesource.com/439304Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#42995}
parent 8f4c4233
......@@ -23,9 +23,10 @@ class PoolTest(unittest.TestCase):
def testException(self):
results = set()
pool = Pool(3)
for result in pool.imap_unordered(Run, [[x] for x in range(0, 12)]):
# Item 10 will not appear in results due to an internal exception.
results.add(result.value)
with self.assertRaises(Exception):
for result in pool.imap_unordered(Run, [[x] for x in range(0, 12)]):
# Item 10 will not appear in results due to an internal exception.
results.add(result.value)
expect = set(range(0, 12))
expect.remove(10)
self.assertEquals(expect, results)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment