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

Function test_islice

tests/test_coverage_sorteddict.py:121–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119 assert all(lhs == rhs for lhs, rhs in zip(reversed(temp), reversed(values)))
120
121def test_islice():
122 mapping = [(val, pos) for pos, val in enumerate(string.ascii_lowercase)]
123 temp = SortedDict(mapping)
124 temp._reset(7)
125
126 for start in range(30):
127 for stop in range(30):
128 assert list(temp.islice(start, stop)) == list(string.ascii_lowercase[start:stop])
129
130def test_irange():
131 mapping = [(val, pos) for pos, val in enumerate(string.ascii_lowercase)]

Callers

nothing calls this directly

Calls 3

SortedDictClass · 0.90
isliceMethod · 0.80
_resetMethod · 0.45

Tested by

no test coverage detected