'Tests that errors occur when you use an invalid solver.'

def test_invalid_solvers(self):

    with self.assertRaises(Exception) as cm:
        Problem(Minimize(Bool())).solve(solver=s.ECOS)
    expected = 'The    solver    ECOS    cannot    solve    the    problem    because    it    cannot    solve    mixed-integer    problems.'
    self.assertEqual(str(cm.exception), expected)
    with self.assertRaises(Exception) as cm:
        Problem(Minimize(lambda_max(self.a))).solve(solver=s.ECOS)
    expected = 'The    solver    ECOS    cannot    solve    the    problem    because    it    cannot    solve    semidefinite    problems.'
    self.assertEqual(str(cm.exception), expected)
    with self.assertRaises(Exception) as cm:
        Problem(Minimize(self.a)).solve(solver=s.SCS)
    expected = 'The    solver    SCS    cannot    solve    the    problem    because    it    cannot    solve    unconstrained    problems.'
    self.assertEqual(str(cm.exception), expected)
