8000 tests/extmod/random_extra_float.py: Skip when funcs not available. · sparkfun/micropython@e4d556b · GitHub
[go: up one dir, main page]

Skip to content

Commit e4d556b

Browse files
committed
tests/extmod/random_extra_float.py: Skip when funcs not available.
This test was factored out from `random_extra.py` back in commit 6572029, 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>
1 parent 9bde125 commit e4d556b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/extmod/random_extra_float.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
try:
22
import random
3-
except ImportError:
4-
print("SKIP")
5-
raise SystemExit
63

7-
try:
8-
random.randint
9-
except AttributeError:
4+
random.random
5+
except (ImportError, AttributeError):
106
print("SKIP")
117
raise SystemExit
128

0 commit comments

Comments
 (0)
0