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

Function predicate

t/unit/utils/test_functional.py:65–69  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

63 iterations = [0]
64
65 def predicate(value):
66 iterations[0] += 1
67 if value == 5:
68 return True
69 return False
70
71 assert first(predicate, range(10)) == 5
72 assert iterations[0] == 6

Callers 5

_wait_untilMethod · 0.85
_wait_untilFunction · 0.85
on_taskFunction · 0.85
firstFunction · 0.85
delta_resolutionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected