tests/extmod/random_extra_float.py: Skip when funcs not available.

This test was factored out from `random_extra.py` back in commit
6572029dc0, 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 <damien@micropython.org>
This commit is contained in:
Damien George
2025-05-28 16:06:36 +10:00
parent 9bde12597a
commit e4d556b149

View File

@@ -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