(self)
| 900 | assert list(reversed(bx)) == ["c", "a"] |
| 901 | |
| 902 | def test_clear(self): |
| 903 | bx = Box() |
| 904 | bx.a = 1 |
| 905 | bx.c = 4 |
| 906 | bx["g"] = 7 |
| 907 | bx.d = 2 |
| 908 | assert list(bx.keys()) == ["a", "c", "g", "d"] |
| 909 | bx.clear() |
| 910 | assert bx == {} |
| 911 | assert not bx.keys() |
| 912 | |
| 913 | def test_bad_recursive(self): |
| 914 | b = Box() |