MCPcopy
hub / github.com/celery/celery / test_stack

Method test_stack

t/unit/utils/test_threads.py:69–78  ·  t/unit/utils/test_threads.py::test_FastLocalStack.test_stack
(self)

Source from the content-addressed store, hash-verified

67class test_FastLocalStack:
68
69 def test_stack(self):
70 x = _FastLocalStack()
71 x.push([&class="cm">#x27;foo'])
72 x.push([&class="cm">#x27;bar'])
73 assert x.top == [&class="cm">#x27;bar']
74 assert len(x) == 2
75 x.pop()
76 assert x.top == [&class="cm">#x27;foo']
77 x.pop()
78 assert x.top is None
79
80
81class test_LocalManager:

Callers

nothing calls this directly

Calls 3

_FastLocalStackClass · 0.90
pushMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected