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

Function test_index

tests/test_coverage_sorteddict.py:314–318  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

312 assert repr(temp) == "CustomSortedDict({'alice': 3, 'bob': 1, 'carol': 2, 'dave': 4})"
313
314def test_index():
315 mapping = [(val, pos) for pos, val in enumerate(string.ascii_lowercase)]
316 temp = SortedDict(mapping)
317 assert temp.index('a') == 0
318 assert temp.index('f', 3, -3) == 5
319
320def test_iloc():
321 with warnings.catch_warnings():

Callers

nothing calls this directly

Calls 2

SortedDictClass · 0.90
indexMethod · 0.45

Tested by

no test coverage detected