(self)
| 799 | pool._pool.register_with_event_loop.assert_called_with(loop) |
| 800 | |
| 801 | def test_on_close(self): |
| 802 | pool = TaskPool(10) |
| 803 | pool._pool = Mock(name='pool') |
| 804 | pool._pool._state = mp.RUN |
| 805 | pool.on_close() |
| 806 | pool._pool.close.assert_called_with() |
| 807 | |
| 808 | def test_on_close__pool_not_running(self): |
| 809 | pool = TaskPool(10) |