|  | @@ -154,46 +154,46 @@ class test_AsynPool(PoolCase):
 | 
											
												
													
														|  |          ebadf.errno = errno.EBADF
 |  |          ebadf.errno = errno.EBADF
 | 
											
												
													
														|  |          with patch('select.poll', create=True) as poller:
 |  |          with patch('select.poll', create=True) as poller:
 | 
											
												
													
														|  |              poll = poller.return_value = Mock(name='poll.poll')
 |  |              poll = poller.return_value = Mock(name='poll.poll')
 | 
											
												
													
														|  | -            poll.poll.return_value = [(3, select.POLLIN)]
 |  | 
 | 
											
												
													
														|  | 
 |  | +            poll.return_value = {3}, set(), 0
 | 
											
												
													
														|  |              self.assertEqual(
 |  |              self.assertEqual(
 | 
											
												
													
														|  | -                asynpool._select({3}, poll=poller),
 |  | 
 | 
											
												
													
														|  | 
 |  | +                asynpool._select({3}, poll=poll),
 | 
											
												
													
														|  |                  ({3}, set(), 0),
 |  |                  ({3}, set(), 0),
 | 
											
												
													
														|  |              )
 |  |              )
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -            poll.poll.return_value = [(3, select.POLLERR)]
 |  | 
 | 
											
												
													
														|  | 
 |  | +            poll.return_value = {3}, set(), 0
 | 
											
												
													
														|  |              self.assertEqual(
 |  |              self.assertEqual(
 | 
											
												
													
														|  | -                asynpool._select({3}, None, {3}, poll=poller),
 |  | 
 | 
											
												
													
														|  | 
 |  | +                asynpool._select({3}, None, {3}, poll=poll),
 | 
											
												
													
														|  |                  ({3}, set(), 0),
 |  |                  ({3}, set(), 0),
 | 
											
												
													
														|  |              )
 |  |              )
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              eintr = socket.error()
 |  |              eintr = socket.error()
 | 
											
												
													
														|  |              eintr.errno = errno.EINTR
 |  |              eintr.errno = errno.EINTR
 | 
											
												
													
														|  | -            poll.poll.side_effect = eintr
 |  | 
 | 
											
												
													
														|  | 
 |  | +            poll.side_effect = eintr
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              readers = {3}
 |  |              readers = {3}
 | 
											
												
													
														|  |              self.assertEqual(
 |  |              self.assertEqual(
 | 
											
												
													
														|  | -                asynpool._select(readers, poll=poller),
 |  | 
 | 
											
												
													
														|  | 
 |  | +                asynpool._select(readers, poll=poll),
 | 
											
												
													
														|  |                  (set(), set(), 1),
 |  |                  (set(), set(), 1),
 | 
											
												
													
														|  |              )
 |  |              )
 | 
											
												
													
														|  |              self.assertIn(3, readers)
 |  |              self.assertIn(3, readers)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          with patch('select.poll') as poller:
 |  |          with patch('select.poll') as poller:
 | 
											
												
													
														|  |              poll = poller.return_value = Mock(name='poll.poll')
 |  |              poll = poller.return_value = Mock(name='poll.poll')
 | 
											
												
													
														|  | -            poll.poll.side_effect = ebadf
 |  | 
 | 
											
												
													
														|  | 
 |  | +            poll.side_effect = ebadf
 | 
											
												
													
														|  |              with patch('select.select') as selcheck:
 |  |              with patch('select.select') as selcheck:
 | 
											
												
													
														|  |                  selcheck.side_effect = ebadf
 |  |                  selcheck.side_effect = ebadf
 | 
											
												
													
														|  |                  readers = {3}
 |  |                  readers = {3}
 | 
											
												
													
														|  |                  self.assertEqual(
 |  |                  self.assertEqual(
 | 
											
												
													
														|  | -                    asynpool._select(readers, poll=poller),
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    asynpool._select(readers, poll=poll),
 | 
											
												
													
														|  |                      (set(), set(), 1),
 |  |                      (set(), set(), 1),
 | 
											
												
													
														|  |                  )
 |  |                  )
 | 
											
												
													
														|  |                  self.assertNotIn(3, readers)
 |  |                  self.assertNotIn(3, readers)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          with patch('select.poll') as poller:
 |  |          with patch('select.poll') as poller:
 | 
											
												
													
														|  |              poll = poller.return_value = Mock(name='poll.poll')
 |  |              poll = poller.return_value = Mock(name='poll.poll')
 | 
											
												
													
														|  | -            poll.poll.side_effect = MemoryError()
 |  | 
 | 
											
												
													
														|  | 
 |  | +            poll.side_effect = MemoryError()
 | 
											
												
													
														|  |              with self.assertRaises(MemoryError):
 |  |              with self.assertRaises(MemoryError):
 | 
											
												
													
														|  | -                asynpool._select({1}, poll=poller)
 |  | 
 | 
											
												
													
														|  | 
 |  | +                asynpool._select({1}, poll=poll)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          with patch('select.poll') as poller:
 |  |          with patch('select.poll') as poller:
 | 
											
												
													
														|  |              poll = poller.return_value = Mock(name='poll.poll')
 |  |              poll = poller.return_value = Mock(name='poll.poll')
 | 
											
										
											
												
													
														|  | @@ -202,9 +202,9 @@ class test_AsynPool(PoolCase):
 | 
											
												
													
														|  |                  def se(*args):
 |  |                  def se(*args):
 | 
											
												
													
														|  |                      selcheck.side_effect = MemoryError()
 |  |                      selcheck.side_effect = MemoryError()
 | 
											
												
													
														|  |                      raise ebadf
 |  |                      raise ebadf
 | 
											
												
													
														|  | -                poll.poll.side_effect = se
 |  | 
 | 
											
												
													
														|  | 
 |  | +                poll.side_effect = se
 | 
											
												
													
														|  |                  with self.assertRaises(MemoryError):
 |  |                  with self.assertRaises(MemoryError):
 | 
											
												
													
														|  | -                    asynpool._select({3}, poll=poller)
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    asynpool._select({3}, poll=poll)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          with patch('select.poll') as poller:
 |  |          with patch('select.poll') as poller:
 | 
											
												
													
														|  |              poll = poller.return_value = Mock(name='poll.poll')
 |  |              poll = poller.return_value = Mock(name='poll.poll')
 | 
											
										
											
												
													
														|  | @@ -214,17 +214,17 @@ class test_AsynPool(PoolCase):
 | 
											
												
													
														|  |                      selcheck.side_effect = socket.error()
 |  |                      selcheck.side_effect = socket.error()
 | 
											
												
													
														|  |                      selcheck.side_effect.errno = 1321
 |  |                      selcheck.side_effect.errno = 1321
 | 
											
												
													
														|  |                      raise ebadf
 |  |                      raise ebadf
 | 
											
												
													
														|  | -                poll.poll.side_effect = se2
 |  | 
 | 
											
												
													
														|  | 
 |  | +                poll.side_effect = se2
 | 
											
												
													
														|  |                  with self.assertRaises(socket.error):
 |  |                  with self.assertRaises(socket.error):
 | 
											
												
													
														|  | -                    asynpool._select({3}, poll=poller)
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    asynpool._select({3}, poll=poll)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |          with patch('select.poll') as poller:
 |  |          with patch('select.poll') as poller:
 | 
											
												
													
														|  |              poll = poller.return_value = Mock(name='poll.poll')
 |  |              poll = poller.return_value = Mock(name='poll.poll')
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -            poll.poll.side_effect = socket.error()
 |  | 
 | 
											
												
													
														|  | -            poll.poll.side_effect.errno = 34134
 |  | 
 | 
											
												
													
														|  | 
 |  | +            poll.side_effect = socket.error()
 | 
											
												
													
														|  | 
 |  | +            poll.side_effect.errno = 34134
 | 
											
												
													
														|  |              with self.assertRaises(socket.error):
 |  |              with self.assertRaises(socket.error):
 | 
											
												
													
														|  | -                asynpool._select({3}, poll=poller)
 |  | 
 | 
											
												
													
														|  | 
 |  | +                asynpool._select({3}, poll=poll)
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      def test_promise(self):
 |  |      def test_promise(self):
 | 
											
												
													
														|  |          fun = Mock()
 |  |          fun = Mock()
 |