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

Method test_clear

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

Source from the content-addressed store, hash-verified

1228 assert list(reversed(bx)) == ["c", "a"]
1229
1230 def test_clear(self):
1231 bx = Box()
1232 bx.a = 1
1233 bx.c = 4
1234 bx["g"] = 7
1235 bx.d = 2
1236 assert list(bx.keys()) == ["a", "c", "g", "d"]
1237 bx.clear()
1238 assert bx == {}
1239 assert not bx.keys()
1240
1241 def test_bad_recursive(self):
1242 b = Box()

Callers

nothing calls this directly

Calls 3

keysMethod · 0.95
clearMethod · 0.95
BoxClass · 0.90

Tested by

no test coverage detected