MCPcopy Create free account
hub / github.com/celery/celery / test_stack

Method test_stack

t/unit/utils/test_threads.py:192–206  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

190class test_LocalStack:
191
192 def test_stack(self):
193 x = _LocalStack()
194 assert x.pop() is None
195 x.__release_local__()
196 ident = x.__ident_func__
197 x.__ident_func__ = ident
198
199 with pytest.raises(RuntimeError):
200 x()[0]
201
202 x.push(['foo'])
203 assert x()[0] == 'foo'
204 x.pop()
205 with pytest.raises(RuntimeError):
206 x()[0]
207
208
209class test_FastLocalStack:

Callers

nothing calls this directly

Calls 6

_LocalStackClass · 0.90
xFunction · 0.85
raisesMethod · 0.80
pushMethod · 0.80
popMethod · 0.45
__release_local__Method · 0.45

Tested by

no test coverage detected