(self)
| 3008 | |
| 3009 | @warnings_helper.ignore_fork_in_thread_deprecation_warnings() |
| 3010 | def test_async_timeout(self): |
| 3011 | p = self.Pool(3) |
| 3012 | try: |
| 3013 | event = threading.Event() if self.TYPE == 'threads' else None |
| 3014 | res = p.apply_async(sqr, (6, TIMEOUT2 + support.SHORT_TIMEOUT, event)) |
| 3015 | get = TimingWrapper(res.get) |
| 3016 | self.assertRaises(multiprocessing.TimeoutError, get, timeout=TIMEOUT2) |
| 3017 | self.assertTimingAlmostEqual(get.elapsed, TIMEOUT2) |
| 3018 | finally: |
| 3019 | if event is not None: |
| 3020 | event.set() |
| 3021 | p.terminate() |
| 3022 | p.join() |
| 3023 | |
| 3024 | def test_imap(self): |
| 3025 | it = self.pool.imap(sqr, list(range(10))) |
nothing calls this directly
no test coverage detected