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

Method test_to_json_basic

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

Source from the content-addressed store, hash-verified

238 assert not isinstance(b["new_list"], BoxList)
239
240 def test_to_json_basic(self):
241 a = Box(test_dict)
242 assert json.loads(a.to_json(indent=0)) == test_dict
243
244 a.to_json(tmp_json_file)
245 with open(tmp_json_file) as f:
246 data = json.load(f)
247 assert data == test_dict
248
249 def test_to_yaml_basic(self):
250 a = Box(test_dict)

Callers

nothing calls this directly

Calls 2

to_jsonMethod · 0.95
BoxClass · 0.90

Tested by

no test coverage detected