From 7c9dc662e60c948628d49fa79a02932555d21ff9 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Fri, 10 Dec 2021 16:49:30 +0000 Subject: [PATCH] test: test for empty Obs added --- tests/obs_test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/obs_test.py b/tests/obs_test.py index 7f7a459c..fe8826f8 100644 --- a/tests/obs_test.py +++ b/tests/obs_test.py @@ -586,6 +586,12 @@ def test_covariance2_symmetry(): assert np.abs(cov_ab) < test_obs1.dvalue * test_obs2.dvalue * (1 + 10 * np.finfo(np.float64).eps) +def test_empty_obs(): + o = pe.Obs([np.random.rand(100)], ['test']) + q = o + pe.Obs([], []) + assert q == o + + def test_jackknife(): full_data = np.random.normal(1.1, 0.87, 5487)