From 5e589914698f62d8c3fa97a38055b5167f3fb784 Mon Sep 17 00:00:00 2001 From: opcoder0 <110003254+opcoder0@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:42:53 +0000 Subject: [PATCH] Fix test_sysuptime failure * The change strips comma (if present) from py_gnmicli proc/uptime output before converting to float --- tests/telemetry/test_telemetry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/telemetry/test_telemetry.py b/tests/telemetry/test_telemetry.py index 1063b71a74..a31aaf0489 100644 --- a/tests/telemetry/test_telemetry.py +++ b/tests/telemetry/test_telemetry.py @@ -230,7 +230,7 @@ def test_sysuptime(duthosts, enum_rand_one_per_hwsku_hostname, ptfhost, gnxi_pat for line_info in system_uptime_info: if "total" in line_info: try: - system_uptime_1st = float(line_info.split(":")[1].strip()) + system_uptime_1st = float(line_info.split(":")[1].strip().rstrip(',')) found_system_uptime_field = True except ValueError as err: pytest.fail(