Skip to main content

LazyUqueryContext

The context for performing lazy uquery operations in bxl. The functions offered on this ctx are the same behaviour as the query functions available within uquery command.

LazyUqueryContext.testsof

def LazyUqueryContext.testsof(
expr: TargetLabel | bxl.UnconfiguredTargetNode | str,
/,
) -> bxl.Lazy

Querying the test targets of the given target. It returns UnconfiguredTargetSet

Example:

def _impl(ctx: bxl.Context):
res = ctx.lazy.uquery().testsof("//:foo_lib").catch().resolve()
if res.is_ok():
nodes = res.get()
ctx.output.print(nodes)
else:
err = res.unwrap_err()
ctx.output.print(err)