From b3a021985b3d477349324b9fc8300856b1ba1af6 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Thu, 9 Dec 2021 09:45:29 +0000 Subject: [PATCH] test: test for exceptions in Obs.__init__ extended --- tests/obs_test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/obs_test.py b/tests/obs_test.py index cedad117..8fbfa43d 100644 --- a/tests/obs_test.py +++ b/tests/obs_test.py @@ -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