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

Method test_clear

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

keysMethod · 0.95
clearMethod · 0.95
BoxClass · 0.90

Tested by

no test coverage detected