mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 06:40:24 +01:00
test: tests for json io extended
This commit is contained in:
parent
b49c707127
commit
ca303c93e9
1 changed files with 8 additions and 2 deletions
|
@ -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'])
|
||||
|
|
Loading…
Add table
Reference in a new issue