Avocado is a set of tools and libraries to help with automated testing. One can call it a test framework with benefits. Native tests are written in Python and they follow the unittest pattern, but any executable can serve as a test.
This commit introduces a new timeout feature, which adds the possibility to set a specific timeout for a block of code with context manager like this:
with self.wait_max(3):
#code which should take max 3 seconds
...
The wait_max method will send SIGALRM if the code doesn't end within 3 seconds. This signal will be caught by avocado-instrumented runner, which will interrupt the test, the same way as with a regular timeout.
This commit introduces a new timeout feature, which adds the possibility to set a specific timeout for a block of code with context manager like this:
The
wait_max
method will sendSIGALRM
if the code doesn't end within 3 seconds. This signal will be caught by avocado-instrumented runner, which will interrupt the test, the same way as with a regular timeout.Reference: #5994