mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01: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])
|
||||
with pytest.raises(Exception):
|
||||
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._value = 0.0
|
||||
|
|
Loading…
Add table
Reference in a new issue