timeout#
- timeout(arg: str | float | int, *, when: str | dict[str, str] | None = None) None#
Specify a timeout value for a test
Usage#
.pyt:import canary canary.directives.timeout(arg, when=...)
.vvt:# VVT: timeout (options=..., platforms=..., parameters=..., testname=...) : argParameters#
arg: The time in seconds. Natural language forms such as “20m”, “1h 20m”, and HH:MM:SS such as “2:30:00” are also allowed and converted to seconds.when: Restrict processing of the directive to this condition
The
whenexpression is limited to the following conditions:testname: Restrict processing of the directive to this test nameplatforms: Restrict processing of the directive to certain platform or platformsoptions: Restrict processing of the directive to command line-ooptionsparameters: Restrict processing of the directive to certain parameter names and values
Notes#
The timeout for a test is determined based on the following rules:
if the test has an explicit timeout set by
canary.directives.timeout, use it;if the test has a keyword that appears in the
test:timeout:configuration section, use it;otherwise, use a the default timeout.