Skip to content

Commit

Permalink
Use closer guess for MacOSX failing test.
Browse files Browse the repository at this point in the history
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 = <cyipopt.tests.unit.test_scipy_ipopt_from_scipy.TestSLSQP object at 0x115154a30>

    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.
  • Loading branch information
moorepants committed Nov 26, 2023
1 parent 0f3cfbd commit 4b9dab3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cyipopt/tests/unit/test_scipy_ipopt_from_scipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4b9dab3

Please sign in to comment.