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

Function test_update

tests/test_coverage_sorteddict.py:278–285  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

276 assert temp.setdefault('A', -1) == -1
277
278def test_update():
279 mapping = [(val, pos) for pos, val in enumerate(string.ascii_lowercase)]
280 temp = SortedDict()
281 temp.update()
282 temp.update(mapping)
283 temp.update(dict(mapping))
284 temp.update(mapping[5:7])
285 assert list(temp.items()) == mapping
286
287def test_update2():
288 mapping = [(val, pos) for pos, val in enumerate(string.ascii_lowercase)]

Callers

nothing calls this directly

Calls 3

updateMethod · 0.95
itemsMethod · 0.95
SortedDictClass · 0.90

Tested by

no test coverage detected