mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
test: tests slightly extended to improve coverage.
This commit is contained in:
parent
352b93ee2c
commit
860852b4d8
2 changed files with 4 additions and 1 deletions
|
@ -11,6 +11,7 @@ def test_covobs():
|
|||
name = 'Covariance'
|
||||
co = pe.cov_Obs(val, cov, name)
|
||||
co.gamma_method()
|
||||
co.details()
|
||||
assert (co.dvalue == np.sqrt(cov))
|
||||
assert (co.value == val)
|
||||
|
||||
|
|
|
@ -46,8 +46,9 @@ def test_Obs_exceptions():
|
|||
my_obs.gamma_method(tau_exp=2.3)
|
||||
my_obs.gamma_method()
|
||||
my_obs.details()
|
||||
my_obs.plot_rep_dist()
|
||||
|
||||
my_obs += pe.Obs([np.random.rand(6)], ['name2|r1'])
|
||||
my_obs += pe.Obs([np.random.rand(6)], ['name2|r1'], idl=[[1, 3, 4, 5, 6, 7]])
|
||||
my_obs += pe.Obs([np.random.rand(6)], ['name2|r2'])
|
||||
my_obs.gamma_method()
|
||||
my_obs.details()
|
||||
|
@ -475,6 +476,7 @@ def test_irregular_error_propagation():
|
|||
pe.Obs([np.random.rand(6)], ['t'], idl=[[4, 18, 27, 29, 57, 80]]),
|
||||
pe.Obs([np.random.rand(50)], ['t'], idl=[list(range(1, 26)) + list(range(50, 100, 2))])]
|
||||
for obs1 in obs_list:
|
||||
obs1.details()
|
||||
for obs2 in obs_list:
|
||||
assert obs1 == (obs1 / obs2) * obs2
|
||||
assert obs1 == (obs1 * obs2) / obs2
|
||||
|
|
Loading…
Add table
Reference in a new issue