'Test the empty read EOF case on both master_fd and stdin.'

def test__copy_eof_on_all(self):

    (read_from_stdout_fd, mock_stdout_fd) = self._pipe()
    pty.STDOUT_FILENO = mock_stdout_fd
    (mock_stdin_fd, write_to_stdin_fd) = self._pipe()
    pty.STDIN_FILENO = mock_stdin_fd
    socketpair = socket.socketpair()
    masters = [s.fileno() for s in socketpair]
    self.fds.extend(masters)
    os.close(masters[1])
    socketpair[1].close()
    os.close(write_to_stdin_fd)
    pty.select = self._mock_select
    self.select_rfds_lengths.append(2)
    self.select_rfds_results.append([mock_stdin_fd, masters[0]])
    self.select_rfds_lengths.append(0)
    with self.assertRaises(IndexError):
        pty._copy(masters[0])
