'Test the list of installed solvers.'

def test_installed_solvers(self):

    from cvxpy.problems.solvers.utilities import SOLVERS
    prob = Problem(Minimize(norm(self.x, 1)), [(self.x == 0)])
    for solver in SOLVERS.keys():
        if (solver in installed_solvers()):
            try:
                prob.solve(solver=solver)
                self.assertItemsAlmostEqual(self.x.value, [0, 0])
            except Exception as cm:
                self.assertEqual(str(cm), 'The    solver    LS    cannot    solve    the    problem.')
        else:
            with self.assertRaises(Exception) as cm:
                prob.solve(solver=solver)
            self.assertEqual(str(cm.exception), ('The    solver    %s    is    not    installed.' % solver))
