MCPcopy Create free account
hub / github.com/grantjenks/python-sortedcontainers / test_clear

Function test_clear

tests/test_coverage_sorteddict.py:59–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57 temp._check()
58
59def test_clear():
60 mapping = [(val, pos) for pos, val in enumerate(string.ascii_lowercase)]
61 temp = SortedDict(mapping)
62 assert len(temp) == 26
63 assert list(temp.items()) == mapping
64 temp.clear()
65 assert len(temp) == 0
66
67def test_contains():
68 mapping = [(val, pos) for pos, val in enumerate(string.ascii_lowercase)]

Callers

nothing calls this directly

Calls 3

itemsMethod · 0.95
clearMethod · 0.95
SortedDictClass · 0.90

Tested by

no test coverage detected