MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / reduce

Function reduce

test/asynchronous/qcheck.py:217–222  ·  view source on GitHub ↗
(case, predicate, reductions=0)

Source from the content-addressed store, hash-verified

215
216
217async def reduce(case, predicate, reductions=0):
218 for _ in range(reduction_attempts):
219 (reduced, simplified) = simplify(case)
220 if reduced and not await predicate(simplified):
221 return await reduce(simplified, predicate, reductions + 1)
222 return (reductions, case)
223
224
225async def isnt(predicate):

Callers 1

checkFunction · 0.70

Calls 2

simplifyFunction · 0.70
predicateFunction · 0.70

Tested by

no test coverage detected