Skip to content

Commit

Permalink
Tests for constants pi and e
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Dec 14, 2023
1 parent 8d9e3fb commit eecaf3c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ def test_sum():
assert np.isnan(_sum([1, np.nan], ignore_nodata=False))


def test_e():
assert e() == pytest.approx(2.71828182846)


def test_pi():
assert pi() == pytest.approx(3.14159265359)


@pytest.mark.parametrize(
"array,expected,ignore_nodata,axis",
[
Expand Down

0 comments on commit eecaf3c

Please sign in to comment.