From e841f05689a945aeca1cf3475c495cd8f080a708 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 5 Nov 2023 22:49:34 +0100 Subject: stress_test.py: fix randint usage Prior to Python 3.12, randint would accept float arguments with .0 fractional part (like 10e10). Starting with Python 3.12, it fails with an error. --- test/stress_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/stress_test.py b/test/stress_test.py index 883c874..d210db6 100755 --- a/test/stress_test.py +++ b/test/stress_test.py @@ -70,8 +70,8 @@ class ExprGen: _OPERATORS = '+', '-', '*', '/' _MIN_NUMOF_OPERATORS = 10 _MAX_NUMOF_OPERATORS = 1000 - _MIN_NUMBER = -10e10 - _MAX_NUMBER = 10e10 + _MIN_NUMBER = int(-10e10) + _MAX_NUMBER = int(10e10) @staticmethod def _random_operator(): -- cgit v1.2.3