From eecaf3c25e8299f1336b618ee1a1c5b192a139b5 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 14 Dec 2023 22:15:13 +0100 Subject: [PATCH] Tests for constants pi and e --- tests/test_math.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_math.py b/tests/test_math.py index a9cffceb..edb3455c 100644 --- a/tests/test_math.py +++ b/tests/test_math.py @@ -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", [