From 129741571082e6c03bcd67c97b7bbe03bd33b7d3 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Thu, 5 Jan 2023 11:56:48 +0100 Subject: [PATCH] test: test for alias gm added. --- tests/obs_test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/obs_test.py b/tests/obs_test.py index bcec9252..5fbedf98 100644 --- a/tests/obs_test.py +++ b/tests/obs_test.py @@ -1015,3 +1015,15 @@ def test_hash(): assert hash(i_obs) != hash((1 + 1e-7) * i_obs) assert hash(obs) != hash(o1) assert hash(o1) != hash(o2) + +def test_gm_alias(): + samples = np.random.rand(500) + + tt1 = pe.Obs([samples], ["ens"]) + tt1.gamma_method() + + tt2 = pe.Obs([samples], ["ens"]) + tt2.gm() + + assert np.isclose(tt1.dvalue, tt2.dvalue) +