mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 11:33:42 +02:00
test: sin2 cos2 test for error propagation added.
This commit is contained in:
parent
9d602e4e51
commit
5adc3e0c76
1 changed files with 7 additions and 0 deletions
|
@ -17,6 +17,13 @@ def test_fuzzy_obs(data, string, S):
|
||||||
my_obs.gamma_method(S=S)
|
my_obs.gamma_method(S=S)
|
||||||
|
|
||||||
|
|
||||||
|
@given(st.floats(allow_nan=False, allow_infinity=False, width=16))
|
||||||
|
def test_sin2_cos2(value):
|
||||||
|
Obs = pe.pseudo_Obs(value, value * 0.123, "C0")
|
||||||
|
iamzero = np.sin(Obs) ** 2 + np.cos(Obs) ** 2 - 1
|
||||||
|
assert iamzero.is_zero(atol=1e-6)
|
||||||
|
|
||||||
|
|
||||||
def test_Obs_exceptions():
|
def test_Obs_exceptions():
|
||||||
with pytest.raises(Exception):
|
with pytest.raises(Exception):
|
||||||
pe.Obs([np.random.rand(10)], ['1', '2'])
|
pe.Obs([np.random.rand(10)], ['1', '2'])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue