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