(self)
| 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() |
nothing calls this directly
no test coverage detected