def test_eintr_on_poll(self):
        # EINTR is supposed to be ignored
        with mock.patch(self.poller_mock, return_vaue=mock.Mock()) as m:
            if not PY3:
                m.return_value.poll.side_effect = select.error
                m.return_value.poll.side_effect.errno = errno.EINTR
            else:
                m.return_value.poll.side_effect = OSError(errno.EINTR, "")
            s, rd, wr = self.test_register()
            s.poll(0)
            assert m.called
        # ...but just that
        with mock.patch(self.poller_mock, return_vaue=mock.Mock()) as m:
            if not PY3:
                m.return_value.poll.side_effect = select.error
                m.return_value.poll.side_effect.errno = errno.EBADF
            else:
                m.return_value.poll.side_effect = OSError(errno.EBADF, "")
            s, rd, wr = self.test_register()
            self.assertRaises(select.error, s.poll, 0)
            assert m.called