tests/perf_bench: Skip bm_chaos test if random.randrange is unavailable.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2022-02-18 16:30:24 +11:00
parent 66fc0f45c1
commit 0a2895b099

View File

@ -218,6 +218,10 @@ class Chaosgame(object):
###########################################################################
# Benchmark interface
if not hasattr(random, "randrange"):
print("SKIP")
raise SystemExit
bm_params = {
(100, 50): (0.25, 100, 50, 50, 50, 1234),
(1000, 1000): (0.25, 200, 400, 400, 1000, 1234),