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

Method test_default_box_callable

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

Source from the content-addressed store, hash-verified

1858 assert {"a": 1} | my_box == {"a": 5}
1859
1860 def test_default_box_callable(self):
1861 def func(box_instance, key):
1862 return DDBox(bi=str(box_instance), key=key)
1863
1864 my_box = DDBox(default_box_attr=func)
1865
1866 assert my_box.a == {"bi": "{}", "key": "a"}
1867
1868
1869@pytest.mark.parametrize("create_on_get", [True, False])

Callers

nothing calls this directly

Calls 1

DDBoxClass · 0.90

Tested by

no test coverage detected