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

Method test_stack

t/unit/utils/test_threads.py:50–64  ·  t/unit/utils/test_threads.py::test_LocalStack.test_stack
(self)

Source from the content-addressed store, hash-verified

48class test_LocalStack:
49
50 def test_stack(self):
51 x = _LocalStack()
52 assert x.pop() is None
53 x.__release_local__()
54 ident = x.__ident_func__
55 x.__ident_func__ = ident
56
57 with pytest.raises(RuntimeError):
58 x()[0]
59
60 x.push([&class="cm">#x27;foo'])
61 assert x()[0] == &class="cm">#x27;foo'
62 x.pop()
63 with pytest.raises(RuntimeError):
64 x()[0]
65
66
67class test_FastLocalStack:

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected