mirror of
https://github.com/micropython/micropython.git
synced 2025-07-21 04:51:12 +02:00
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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user