From 06a2125ba90e878b6530cccdbb5952b8f59020dc Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Mon, 23 Oct 2023 09:16:12 +0200 Subject: [PATCH] pytest: update random.seed() argument From python3.11 the function accepts only NoneType, int, float, str, bytes, or bytearray Signed-off-by: Michal Mielewczyk --- tests/functional/tests/engine/test_read.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/functional/tests/engine/test_read.py b/tests/functional/tests/engine/test_read.py index b61f6b3..911c68a 100644 --- a/tests/functional/tests/engine/test_read.py +++ b/tests/functional/tests/engine/test_read.py @@ -1,5 +1,6 @@ # # Copyright(c) 2019-2022 Intel Corporation +# Copyright(c) 2024 Huawei Technologies # SPDX-License-Identifier: BSD-3-Clause # @@ -187,7 +188,7 @@ def print_test_case( @pytest.mark.parametrize("cacheline_size", CacheLineSize) @pytest.mark.parametrize("cache_mode", CacheMode) -@pytest.mark.parametrize("rand_seed", [datetime.now()]) +@pytest.mark.parametrize("rand_seed", [datetime.now().timestamp()]) def test_read_data_consistency(pyocf_ctx, cacheline_size, cache_mode, rand_seed): CACHELINE_COUNT = 9 SECTOR_SIZE = Size.from_sector(1).B