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:
parent
9bde12597a
commit
e4d556b149
1 changed files with 2 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue