(self)
| 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) |