From 7304991ce675337dcd8f0673d1123574ef6d89c7 Mon Sep 17 00:00:00 2001 From: David Fernandez Date: Tue, 2 Apr 2024 16:38:14 +0100 Subject: [PATCH] [OPT-1116] fix coverage (2) --- sl_util/tests/unit/test_str_utils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sl_util/tests/unit/test_str_utils.py b/sl_util/tests/unit/test_str_utils.py index 99585542..9430afad 100644 --- a/sl_util/tests/unit/test_str_utils.py +++ b/sl_util/tests/unit/test_str_utils.py @@ -1,4 +1,4 @@ -from pytest import mark +from pytest import mark, param import random from unittest.mock import patch from sl_util.sl_util.str_utils import deterministic_uuid, to_number @@ -30,8 +30,11 @@ def test_deterministic_uuid_without_source(self, source): # Then we obtain two different values assert uuid1 != uuid2 - @mark.parametrize('source', [random.randint(0, 100), str(random.randint(0, 100))]) - def test_to_number(self, source): + @mark.parametrize('source', [ + param(random.randint(0, 100)), + param(str(random.randint(0, 100))) + ]) + def test_to_number(self, source: any): # GIVEN a random integer # WHEN it is transformed to a number