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

Function test_irange

tests/test_coverage_sorteddict.py:130–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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)]
132 temp = SortedDict(mapping)
133 temp._reset(7)
134 for start in range(26):
135 for stop in range(start + 1, 26):
136 result = list(string.ascii_lowercase[start:stop])
137 assert list(temp.irange(result[0], result[-1])) == result
138
139def test_irange_key():
140 temp = SortedDict(modulo, ((val, val) for val in range(100)))

Callers

nothing calls this directly

Calls 3

SortedDictClass · 0.90
_resetMethod · 0.45
irangeMethod · 0.45

Tested by

no test coverage detected