random: Add test_randrange.py.

pull/226/merge
Paul Sokolovsky 2017-11-25 12:31:35 +02:00
rodzic ac6fcb4729
commit 7c6e26bfcd
1 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,14 @@
from random import *
UPPER = 100
s = set()
# This number of course depends on a particular PRNG and its default seed
# as used by MicroPython.
for c in range(496):
r = randrange(UPPER)
s.add(r)
assert len(s) == UPPER