Skip to content

Commit 62a3628

Browse files
committed
improve test exception OdrStop
1 parent 50cb5e4 commit 62a3628

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_odr_fit.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,9 @@ def f(x: np.ndarray, beta: np.ndarray) -> np.ndarray:
588588
return beta[0] * np.exp(beta[1]*x)
589589

590590
with pytest.raises(OdrStop):
591-
_ = odr_fit(f, xdata, ydata, beta0)
591+
sol = odr_fit(f, xdata, ydata, beta0)
592+
assert not sol.success
593+
assert sol.info == 51000
592594

593595

594596
def test_compare_scipy(case1):

0 commit comments

Comments
 (0)