mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
tests: test_import_non_json_string added.
This commit is contained in:
parent
54789f7fe6
commit
504a8f3486
1 changed files with 6 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import gzip
|
import gzip
|
||||||
|
import rapidjson
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pyerrors as pe
|
import pyerrors as pe
|
||||||
import pyerrors.input.json as jsonio
|
import pyerrors.input.json as jsonio
|
||||||
|
@ -378,6 +379,11 @@ def test_reconstruct_non_linear_r_obs_list(tmp_path):
|
||||||
assert assert_equal_Obs(oa, ob)
|
assert assert_equal_Obs(oa, ob)
|
||||||
|
|
||||||
|
|
||||||
|
def test_import_non_json_string():
|
||||||
|
with pytest.raises(rapidjson.JSONDecodeError):
|
||||||
|
pe.input.json.import_json_string("this is garbage")
|
||||||
|
|
||||||
|
|
||||||
def assert_equal_Obs(to, ro):
|
def assert_equal_Obs(to, ro):
|
||||||
for kw in ["N", "cov_names", "covobs", "ddvalue", "dvalue", "e_content",
|
for kw in ["N", "cov_names", "covobs", "ddvalue", "dvalue", "e_content",
|
||||||
"e_names", "idl", "mc_names", "names",
|
"e_names", "idl", "mc_names", "names",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue