From 0a2895b0998bc7ab66b8339acf64fda0339d1e53 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 18 Feb 2022 16:30:24 +1100 Subject: [PATCH] tests/perf_bench: Skip bm_chaos test if random.randrange is unavailable. Signed-off-by: Damien George --- tests/perf_bench/bm_chaos.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/perf_bench/bm_chaos.py b/tests/perf_bench/bm_chaos.py index d0f1337db7..e0e9269ebd 100644 --- a/tests/perf_bench/bm_chaos.py +++ b/tests/perf_bench/bm_chaos.py @@ -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),