mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 06:40:24 +01: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 gzip
|
||||
import rapidjson
|
||||
import numpy as np
|
||||
import pyerrors as pe
|
||||
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)
|
||||
|
||||
|
||||
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):
|
||||
for kw in ["N", "cov_names", "covobs", "ddvalue", "dvalue", "e_content",
|
||||
"e_names", "idl", "mc_names", "names",
|
||||
|
|
Loading…
Add table
Reference in a new issue