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

Function test_init

tests/test_stress_sortedset.py:23–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21 return func
22
23def test_init():
24 sst = SortedSet()
25 sst._check()
26
27 sst = SortedSet()
28 sst._reset(10000)
29 assert sst._list._load == 10000
30 sst._check()
31
32 sst = SortedSet(range(10000))
33 assert all(tup[0] == tup[1] for tup in zip(sst, range(10000)))
34
35 sst.clear()
36 assert len(sst) == 0
37 assert list(iter(sst)) == []
38 sst._check()
39
40@actor
41def stress_contains(sst):

Callers

nothing calls this directly

Calls 5

_checkMethod · 0.95
clearMethod · 0.95
SortedSetClass · 0.90
iterFunction · 0.70
_resetMethod · 0.45

Tested by

no test coverage detected