diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-11-05 22:49:34 +0100 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-11-05 22:49:36 +0100 |
commit | e841f05689a945aeca1cf3475c495cd8f080a708 (patch) | |
tree | 1477f39ed9669cb88fe371b3c06496a137c4ca7b /test | |
parent | Makefile: align assignments (diff) | |
download | math-server-e841f05689a945aeca1cf3475c495cd8f080a708.tar.gz math-server-e841f05689a945aeca1cf3475c495cd8f080a708.zip |
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.
Diffstat (limited to '')
-rwxr-xr-x | test/stress_test.py | 4 |
1 files 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(): |