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

Function test_bisect

tests/test_coverage_sortedset.py:244–249  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

242 assert all(val == temp[val] for val in range(101))
243
244def test_bisect():
245 temp = SortedSet(range(100))
246 temp._reset(7)
247 assert all(temp.bisect_left(val) == val for val in range(100))
248 assert all(temp.bisect(val) == (val + 1) for val in range(100))
249 assert all(temp.bisect_right(val) == (val + 1) for val in range(100))
250
251def test_bisect_key():
252 temp = SortedSet(range(100), key=lambda val: val)

Callers

nothing calls this directly

Calls 5

SortedSetClass · 0.90
bisectMethod · 0.80
_resetMethod · 0.45
bisect_leftMethod · 0.45
bisect_rightMethod · 0.45

Tested by

no test coverage detected