MCPcopy Create free account
hub / github.com/cdgriffith/Box / test_to_json_basic

Method test_to_json_basic

test/test_box.py:289–296  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

287 assert not isinstance(b["new_list"], BoxList)
288
289 def test_to_json_basic(self):
290 a = Box(test_dict)
291 assert json.loads(a.to_json(indent=0)) == test_dict
292
293 a.to_json(tmp_json_file)
294 with open(tmp_json_file) as f:
295 data = json.load(f)
296 assert data == test_dict
297
298 def test_to_yaml_basic(self):
299 a = Box(test_dict)

Callers

nothing calls this directly

Calls 2

to_jsonMethod · 0.95
BoxClass · 0.90

Tested by

no test coverage detected