Skip to content

Commit

Permalink
tests/extmod/select_poll_eintr.py: Improve robustness of test.
Browse files Browse the repository at this point in the history
Increase allowed range of dt_ms, and print it in case of failure.

Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Aug 14, 2023
1 parent f6af484 commit 8851800
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/extmod/select_poll_eintr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 8851800

Please sign in to comment.