From b565c4617821434d943ea92182f5dab46b4d2fd4 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Mon, 8 Feb 2021 10:53:15 +0000 Subject: [PATCH] ignore ignore; add infinite loop test that catched KeyboardInterrupt --- modman/scripts/test5-infinite-loop-sigint.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 modman/scripts/test5-infinite-loop-sigint.py diff --git a/modman/scripts/test5-infinite-loop-sigint.py b/modman/scripts/test5-infinite-loop-sigint.py new file mode 100755 index 0000000..40b87f1 --- /dev/null +++ b/modman/scripts/test5-infinite-loop-sigint.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +from time import sleep + + +def run(): + try: + n = 0 + while True: + print(f"\tTest Infinite Loop with sigint: {n}") + n += 1 + sleep(0.3) + except KeyboardInterrupt: + print("\tTest Infinite Loop with sigint: bye bye!") + + +