Files
buildroot/support/testing/tests/package/sample_python_questionary.py
Manuel Diener 2fe27d55f1 package/python-questionary: new package
Signed-off-by: Manuel Diener <manuel.diener@oss.othermo.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2026-10-22 23:59:10 +02:00

17 lines
454 B
Python

# questionary is tricky to test as there seems to be no option to pass in stdin.
# Therefore the ask is going to time out on purpose so the test can check if the ask
# was successfully written to stdout.
import questionary
import asyncio
async def main():
try:
async with asyncio.timeout(5):
await questionary.press_any_key_to_continue().ask_async()
except:
raise
if __name__ == '__main__':
asyncio.run(main())