From e4d556b14931d0c5245cda585341f377f9186298 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 28 May 2025 16:06:36 +1000 Subject: [PATCH] tests/extmod/random_extra_float.py: Skip when funcs not available. This test was factored out from `random_extra.py` back in commit 6572029dc0665e58c2ea7355c9e541bdf83105a4, and the skip logic copied from that file. But the skip logic needs to test that the `random` and `uniform` functions exist, not `randint`. This commit fixes that skip logic. Signed-off-by: Damien George --- tests/extmod/random_extra_float.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/extmod/random_extra_float.py b/tests/extmod/random_extra_float.py index 3b37ed8dc..03973c583 100644 --- a/tests/extmod/random_extra_float.py +++ b/tests/extmod/random_extra_float.py @@ -1,12 +1,8 @@ try: import random -except ImportError: - print("SKIP") - raise SystemExit -try: - random.randint -except AttributeError: + random.random +except (ImportError, AttributeError): print("SKIP") raise SystemExit