mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 11:33:42 +02:00
fix: exception for ts<=t0 generalized, tests added.
This commit is contained in:
parent
43118bb67d
commit
98ce553521
2 changed files with 27 additions and 2 deletions
|
@ -242,12 +242,36 @@ def test_matrix_corr():
|
|||
|
||||
corr_mat.matrix_symmetric()
|
||||
|
||||
|
||||
def test_GEVP_warnings():
|
||||
corr_aa = _gen_corr(1)
|
||||
corr_ab = 0.5 * corr_aa
|
||||
|
||||
corr_mat = pe.Corr(np.array([[corr_aa, corr_ab], [corr_ab, corr_aa]]))
|
||||
corr_mat.item(0, 0)
|
||||
|
||||
with pytest.warns(RuntimeWarning):
|
||||
corr_mat.GEVP(0, 1, sort="Eigenvalue")
|
||||
|
||||
with pytest.warns(DeprecationWarning):
|
||||
corr_mat.GEVP(0, sorted_list="Eigenvalue")
|
||||
|
||||
with pytest.warns(DeprecationWarning):
|
||||
corr_mat.GEVP(0, state=0)
|
||||
|
||||
def test_GEVP_exceptions():
|
||||
corr_aa = _gen_corr(1)
|
||||
corr_ab = 0.5 * corr_aa
|
||||
|
||||
corr_mat = pe.Corr(np.array([[corr_aa, corr_ab], [corr_ab, corr_aa]]))
|
||||
corr_mat.item(0, 0)
|
||||
|
||||
with pytest.raises(Exception):
|
||||
corr_mat.GEVP(0, 0, sort=None)
|
||||
|
||||
with pytest.raises(Exception):
|
||||
corr_mat.GEVP(1, 0, sort="Eigenvector")
|
||||
|
||||
with pytest.raises(Exception):
|
||||
corr_mat.GEVP(0, 1, sort="This sorting method does not exist.")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue