set_attribute#
- set_attribute(*, when: str | dict[str, str] | None = None, **attributes: Any) None#
Set an attribute on the test
Usage#
.pyt:import canary canary.directives.set_attribute(*, when=..., **attributes)
.vvt:NAParameters#
when: Restrict processing of the directive to this conditionattributes:attr:valuepairs
Examples#
import sys import canary canary.directives.set_attribute(program="program_name")
will set the attribute
programon the test case with value “program_name”.