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

Method test_box_inits

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

Source from the content-addressed store, hash-verified

207 Box("123", "432")
208
209 def test_box_inits(self):
210 a = Box({"data": 2, "count": 5})
211 b = Box(data=2, count=5)
212 c = Box({"data": 2, "count": 1}, count=5)
213 d = Box([("data", 2), ("count", 5)])
214 e = Box({"a": [{"item": 3}, {"item": []}]})
215 assert e.a[1].item == []
216 assert a == b == c == d
217
218 def test_bad_inits(self):
219 with pytest.raises(ValueError):

Callers

nothing calls this directly

Calls 1

BoxClass · 0.90

Tested by

no test coverage detected