'Test examples that caused key error.'

def test_key_error(self):

    if (CVXOPT in installed_solvers()):
        import cvxpy as cvx
        x = cvx.Variable()
        u = (- cvx.exp(x))
        prob = cvx.Problem(cvx.Maximize(u), [(x == 1)])
        prob.solve(verbose=True, solver=cvx.CVXOPT)
        prob.solve(verbose=True, solver=cvx.CVXOPT)
        import numpy as np
        import cvxopt
        import cvxpy as cp
        kD = 2
        Sk = cp.semidefinite(kD)
        Rsk = cp.Parameter(kD, kD)
        mk = cp.Variable(kD, 1)
        musk = cp.Parameter(kD, 1)
        logpart = ((((-0.5) * cp.log_det(Sk)) + (0.5 * cp.matrix_frac(mk, Sk))) + ((kD / 2.0) * np.log((2 * np.pi))))
        linpart = ((mk.T * musk) - (0.5 * cp.trace((Sk * Rsk))))
        obj = (logpart - linpart)
        prob = cp.Problem(cp.Minimize(obj))
        musk.value = np.ones((2, 1))
        covsk = np.diag([0.3, 0.5])
        Rsk.value = (covsk + (musk.value * musk.value.T))
        prob.solve(verbose=True, solver=cp.CVXOPT)
        print 'second    solve'
        prob.solve(verbose=False, solver=cp.CVXOPT)
