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

Function check

test/asynchronous/qcheck.py:232–242  ·  view source on GitHub ↗
(predicate, generator)

Source from the content-addressed store, hash-verified

230
231
232async def check(predicate, generator):
233 counter_examples = []
234 for _ in range(gen_target):
235 case = generator()
236 try:
237 if not await predicate(case):
238 reduction = await reduce(case, predicate)
239 counter_examples.append("after {} reductions: {!r}".format(*reduction))
240 except:
241 counter_examples.append(f"{case!r} : {traceback.format_exc()}")
242 return counter_examples
243
244
245async def check_unittest(test, predicate, generator):

Callers 1

check_unittestFunction · 0.70

Calls 2

predicateFunction · 0.70
reduceFunction · 0.70

Tested by

no test coverage detected