MCPcopy
hub / github.com/celery/celery / test_stackprotection

Method test_stackprotection

t/unit/tasks/test_trace.py:1212–1224  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1210
1211class test_stackprotection:
1212 def test_stackprotection(self):
1213 setup_worker_optimizations(self.app)
1214 try:
1215
1216 @self.app.task(shared=False, bind=True)
1217 def foo(self, i):
1218 if i:
1219 return foo(0)
1220 return self.request
1221
1222 assert foo(1).called_directly
1223 finally:
1224 reset_worker_optimizations(self.app)
1225
1226 def test_stackprotection_headers_passed_on_new_request_stack(self):
1227 setup_worker_optimizations(self.app)

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected