require

forge.strategyfunctionSince Forge API 1
Signaturepython
forge.strategy.require(condition: object, message: str) -> None

Stop the run with message unless condition is true.

Parameters

NameType
conditionobject
messagestr

A plain assert works the same way. Both stop the run, in compute() or in a hook, with the file and line of the check. condition is one true or false value: for an array write require(bool(x.all()), ...).