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
1 changed files with 4 additions and 0 deletions

View File

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