From ca303c93e99a1512eccafbd7d75d774f5038d617 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Thu, 9 Dec 2021 15:59:53 +0000 Subject: [PATCH] test: tests for json io extended --- tests/io_test.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/io_test.py b/tests/io_test.py index 7bb80cc0..79b61c61 100644 --- a/tests/io_test.py +++ b/tests/io_test.py @@ -41,6 +41,9 @@ def test_jsonio(): os.remove(fname + '.json.gz') + for o, r in zip(ol, rl): + assert np.all(o == r) + for i in range(len(rl)): if isinstance(ol[i], pe.Obs): o = ol[i] - rl[i] @@ -57,6 +60,9 @@ def test_jsonio(): rl = jsonio.load_json(fname, gz=False, full_output=True) - assert(description == rl['description']) - os.remove(fname + '.json') + + for o, r in zip(ol, rl['obsdata']): + assert np.all(o == r) + + assert(description == rl['description'])