mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
fix: io tests for corr now properly clean up
This commit is contained in:
parent
9b52a9a615
commit
c8ec5909f1
1 changed files with 2 additions and 0 deletions
|
@ -105,6 +105,7 @@ def test_json_corr_io():
|
|||
my_corr.tag = corr_tag
|
||||
pe.input.json.dump_to_json(my_corr, 'corr')
|
||||
recover = pe.input.json.load_json('corr')
|
||||
os.remove('corr.json.gz')
|
||||
assert np.all([o.is_zero() for o in [x for x in (my_corr - recover) if x is not None]])
|
||||
assert my_corr.tag == recover.tag
|
||||
assert my_corr.reweighted == recover.reweighted
|
||||
|
@ -120,5 +121,6 @@ def test_json_corr_2d_io():
|
|||
my_corr.tag = tag
|
||||
pe.input.json.dump_to_json(my_corr, 'corr')
|
||||
recover = pe.input.json.load_json('corr')
|
||||
os.remove('corr.json.gz')
|
||||
assert np.all([np.all([o.is_zero() for o in q]) for q in [x.ravel() for x in (my_corr - recover) if x is not None]])
|
||||
assert my_corr.tag == recover.tag
|
||||
|
|
Loading…
Add table
Reference in a new issue