MCPcopy
hub / github.com/celery/celery / test_pop_and_ordering_again

Method test_pop_and_ordering_again

t/unit/utils/test_collections.py:292–301  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

290 assert i == 0 # last item is zero
291
292 def test_pop_and_ordering_again(self):
293 s = LimitedSet(maxlen=5)
294 for i in range(10):
295 s.add(i)
296 j = -1
297 for _ in range(5):
298 i = s.pop()
299 assert j < i
300 i = s.pop()
301 assert i is None
302
303 def test_as_dict(self):
304 s = LimitedSet(maxlen=2)

Callers

nothing calls this directly

Calls 3

addMethod · 0.95
popMethod · 0.95
LimitedSetClass · 0.90

Tested by

no test coverage detected