From 88518009cec91d48451b97df35ca8ee053190378 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 14 Aug 2023 19:37:01 +1000 Subject: [PATCH] tests/extmod/select_poll_eintr.py: Improve robustness of test. Increase allowed range of dt_ms, and print it in case of failure. Signed-off-by: Damien George --- tests/extmod/select_poll_eintr.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/extmod/select_poll_eintr.py b/tests/extmod/select_poll_eintr.py index f53efcc83e20..e1cbc2aaf57d 100644 --- a/tests/extmod/select_poll_eintr.py +++ b/tests/extmod/select_poll_eintr.py @@ -41,7 +41,10 @@ def thread_main(): result = poller.poll(400) dt_ms = (time.time_ns() - t0) / 1e6 print("result:", result) -print("dt in range:", 380 <= dt_ms <= 500) +if 380 <= dt_ms <= 600: + print("dt in range") +else: + print("dt not in range:", dt_ms) # Clean up. s.close()