mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 06:40:24 +01:00
test: tests for covobs initialization added
This commit is contained in:
parent
b3a021985b
commit
5a8b6483c8
1 changed files with 20 additions and 0 deletions
|
@ -70,3 +70,23 @@ def test_covobs_name_collision():
|
|||
def test_covobs_replica_separator():
|
||||
with pytest.raises(Exception):
|
||||
covobs = pe.cov_Obs(0.5, 0.002, 'test|r2')
|
||||
|
||||
|
||||
def test_covobs_init():
|
||||
covobs = pe.cov_Obs(0.5, 0.002, 'test')
|
||||
covobs = pe.cov_Obs([1, 2], [0.1, 0.2], 'test')
|
||||
covobs = pe.cov_Obs([1, 2], np.array([0.1, 0.2]), 'test')
|
||||
covobs = pe.cov_Obs([1, 2], [[0.1, 0.2], [0.1, 0.2]], 'test')
|
||||
covobs = pe.cov_Obs([1, 2], np.array([[0.1, 0.2], [0.1, 0.2]]), 'test')
|
||||
|
||||
|
||||
|
||||
def test_covobs_exceptions():
|
||||
with pytest.raises(Exception):
|
||||
covobs = pe.cov_Obs(0.1, [[0.1, 0.2], [0.1, 0.2]], 'test')
|
||||
with pytest.raises(Exception):
|
||||
covobs = pe.cov_Obs(0.1, np.array([[0.1, 0.2], [0.1, 0.2]]), 'test')
|
||||
with pytest.raises(Exception):
|
||||
covobs = pe.cov_Obs([0.5, 0.1], np.array([[2, 1, 3], [1, 2, 3]]), 'test')
|
||||
with pytest.raises(Exception):
|
||||
covobs = pe.cov_Obs([0.5, 0.1], np.random.random((2, 2, 2)), 'test')
|
||||
|
|
Loading…
Add table
Reference in a new issue