From 4b9dab3d7f6ad99677b3792a9a2a3aab9884f49c Mon Sep 17 00:00:00 2001 From: "Jason K. Moore" Date: Sun, 26 Nov 2023 08:50:58 +0100 Subject: [PATCH] Use closer guess for MacOSX failing test. This was failing on MacOSC in these versions: Python 3.8 + IPOPT 3.13 & 3.14 Python 3.9 + IPOPT 3.13 Python 3.10 + IPOPT 3.13 & 314 with this error: ________________ TestSLSQP.test_minimize_unbounded_approximated ________________ self = def test_minimize_unbounded_approximated(self): # Minimize, method=None: unbounded, approximated jacobian. jacs = [None, False] for jac in jacs: res = minimize(self.fun, [-1.0, 1.0], args=(-1.0, ), jac=jac, method=None, options=self.opts) > assert_(res['success'], res['message']) E AssertionError: b'Algorithm stopped at a point that was converged, not to "desired" tolerances, but to "acceptable" tolerances (see the acceptable-... options).' cyipopt/tests/unit/test_scipy_ipopt_from_scipy.py:158: AssertionError =========================== short test summary info ============================ FAILED cyipopt/tests/unit/test_scipy_ipopt_from_scipy.py::TestSLSQP::test_minimize_unbounded_approximated - AssertionError: b'Algorithm stopped at a point that was converged, not to "desired" tolerances, but to "acceptable" tolerances (see the acceptable-... options).' ====== 1 failed, 90 passed, 12 skipped, 1 xfailed, 43 warnings in 11.88s ======= Error: Process completed with exit code 1. I changed the guess for this test to possibly give convergence. --- cyipopt/tests/unit/test_scipy_ipopt_from_scipy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyipopt/tests/unit/test_scipy_ipopt_from_scipy.py b/cyipopt/tests/unit/test_scipy_ipopt_from_scipy.py index 1913bef..5763887 100644 --- a/cyipopt/tests/unit/test_scipy_ipopt_from_scipy.py +++ b/cyipopt/tests/unit/test_scipy_ipopt_from_scipy.py @@ -170,7 +170,7 @@ def test_minimize_bounded_approximated(self): jacs = [None, False] for jac in jacs: with np.errstate(invalid='ignore'): - res = minimize(self.fun, [-1.0, 1.0], args=(-1.0, ), + res = minimize(self.fun, [2.0, 1.0], args=(-1.0, ), jac=jac, bounds=((2.5, None), (None, 0.5)), method=None, options=self.opts)