(self)
| 1163 | assert list(reversed(bx)) == ["c", "a"] |
| 1164 | |
| 1165 | def test_clear(self): |
| 1166 | bx = Box() |
| 1167 | bx.a = 1 |
| 1168 | bx.c = 4 |
| 1169 | bx["g"] = 7 |
| 1170 | bx.d = 2 |
| 1171 | assert list(bx.keys()) == ["a", "c", "g", "d"] |
| 1172 | bx.clear() |
| 1173 | assert bx == {} |
| 1174 | assert not bx.keys() |
| 1175 | |
| 1176 | def test_bad_recursive(self): |
| 1177 | b = Box() |