mirror of
https://github.com/micropython/micropython.git
synced 2025-08-23 19:10:30 +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:
|
try:
|
||||||
import random
|
import random
|
||||||
except ImportError:
|
|
||||||
print("SKIP")
|
|
||||||
raise SystemExit
|
|
||||||
|
|
||||||
try:
|
random.random
|
||||||
random.randint
|
except (ImportError, AttributeError):
|
||||||
except AttributeError:
|
|
||||||
print("SKIP")
|
print("SKIP")
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user