Skip to content

Commit

Permalink
fix: wrong order of if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr committed Sep 13, 2024
1 parent b1632e9 commit 108e119
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_integ.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ def test_func(x): return x**-2
err_msg="x^(-2) integral failed across interval [1, inf].")

if is_jax_galsim():
assert np.isnan(galsim.integ.int1d(test_func, 0., 1., test_rel_err, test_abs_err))
else:
with assert_raises(galsim.GalSimError):
galsim.integ.int1d(test_func, 0., 1., test_rel_err, test_abs_err)
else:
assert np.isnan(galsim.integ.int1d(test_func, 0., 1., test_rel_err, test_abs_err))


@timer
Expand Down

0 comments on commit 108e119

Please sign in to comment.