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

Function test_nested_list_paths

test/test_strict_box.py:316–321  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

314
315
316def test_nested_list_paths():
317 item = StrictBox(values=[[{"value": 1}]], box_dots=True)
318 setattr(item, "values[0][0].value", 2)
319 assert item["values"][0][0].value == 2
320 with pytest.raises(BoxKeyError):
321 setattr(item, "values[0][0].other", 3)
322
323
324def test_intact_mapping_existing_key_never_runs_missing_factory():

Callers

nothing calls this directly

Calls 1

StrictBoxClass · 0.90

Tested by

no test coverage detected