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

Method test_clear

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

keysMethod · 0.95
clearMethod · 0.95
BoxClass · 0.90

Tested by

no test coverage detected