mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
test: test for exceptions in Obs.__init__ extended
This commit is contained in:
parent
8879e6b382
commit
b3a021985b
1 changed files with 6 additions and 0 deletions
|
@ -22,6 +22,12 @@ def test_Obs_exceptions():
|
||||||
pe.Obs([np.random.rand(10)], [1])
|
pe.Obs([np.random.rand(10)], [1])
|
||||||
with pytest.raises(Exception):
|
with pytest.raises(Exception):
|
||||||
pe.Obs([np.random.rand(4)], ['name'])
|
pe.Obs([np.random.rand(4)], ['name'])
|
||||||
|
with pytest.raises(Exception):
|
||||||
|
pe.Obs([np.random.rand(5)], ['1'], idl=[[5, 3, 2 ,4 ,1]])
|
||||||
|
with pytest.raises(Exception):
|
||||||
|
pe.Obs([np.random.rand(5)], ['1'], idl=['t'])
|
||||||
|
with pytest.raises(Exception):
|
||||||
|
pe.Obs([np.random.rand(5)], ['1'], idl=[range(1, 8)])
|
||||||
|
|
||||||
my_obs = pe.Obs([np.random.rand(6)], ['name'])
|
my_obs = pe.Obs([np.random.rand(6)], ['name'])
|
||||||
my_obs._value = 0.0
|
my_obs._value = 0.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue