Closed
Description
Stop a test execution during an async keyword with SIGINT or CTRL+C. Now the teardown with async keywords is executed, but the test keyword still runs and is not stopped.
Example:
Test python library:
import asyncio
from robot.api.deco import library, keyword
from robot.api import logger
@library
class TestLibrary:
@keyword(name="Async Sleep")
async def async_sleep(self, time: int, log_message: str):
logger.info(f"{log_message} start", also_console=True)
await asyncio.sleep(time)
logger.info(f"{log_message} end", also_console=True)
Test robot suite:
*** Settings ***
Library TestLibrary.py
*** Test Cases ***
Test
TestLibrary.Async Sleep ${5} Sleep Test
[Teardown] TestLibrary.Async Sleep ${10} Sleep Teardown
Result: