MCPcopy
hub / github.com/celery/celery / test_maybe_evaluate

Method test_maybe_evaluate

t/unit/utils/test_local.py:336–343  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

334 object.__getattribute__(p, '__pending__')
335
336 def test_maybe_evaluate(self):
337 x = PromiseProxy(lambda: 30)
338 assert not x.__evaluated__()
339 assert maybe_evaluate(x) == 30
340 assert maybe_evaluate(x) == 30
341
342 assert maybe_evaluate(30) == 30
343 assert x.__evaluated__()
344
345
346class test_celery_import:

Callers

nothing calls this directly

Calls 3

__evaluated__Method · 0.95
PromiseProxyClass · 0.90
maybe_evaluateFunction · 0.90

Tested by

no test coverage detected