test: test for alias gm added.

This commit is contained in:
Fabian Joswig 2023-01-05 11:56:48 +01:00
parent 91ec0bff41
commit 1297415710
No known key found for this signature in database

View file

@ -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)