From 02814889edb2bcef3c12d7e06bee7b6e234a1479 Mon Sep 17 00:00:00 2001 From: Evgeniy Zayats Date: Sun, 2 Jun 2024 20:13:34 -0400 Subject: [PATCH] tests: fix ranges upper boundary, closes #754 Signed-off-by: Evgeniy Zayats --- pytest_tests/tests/object/test_object_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest_tests/tests/object/test_object_api.py b/pytest_tests/tests/object/test_object_api.py index 7e86cbdab..91565f276 100755 --- a/pytest_tests/tests/object/test_object_api.py +++ b/pytest_tests/tests/object/test_object_api.py @@ -99,7 +99,7 @@ def generate_ranges( for offset, length in file_ranges: range_length = random.randint(RANGE_MIN_LEN, RANGE_MAX_LEN) - range_start = random.randint(offset, offset + length) + range_start = random.randint(offset, offset + length - 1) file_ranges_to_test.append((range_start, min(range_length, storage_object.size - range_start)))