From 28352f4c0ca7f44cb8b33a137c17ea58a7099899 Mon Sep 17 00:00:00 2001 From: Julia Pineda Date: Thu, 3 Aug 2023 13:16:26 +0800 Subject: [PATCH] [FIX] Update condition to trim parameter list based on AD9081 configuration Signed-off-by: Julia Pineda --- test/test_ad9081.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/test_ad9081.py b/test/test_ad9081.py index e03d6f151..f02da4824 100644 --- a/test/test_ad9081.py +++ b/test/test_ad9081.py @@ -13,10 +13,9 @@ def scale_field(param_set, iio_uri): dev = adi.ad9081(uri=iio_uri) for field in param_set: - if param_set[field] is not list: - continue - existing_val = getattr(dev, field) - param_set[field] = param_set[field][0] * len(existing_val) + if isinstance(param_set[field], list): + existing_val = getattr(dev, field) + param_set[field] = [param_set[field][0]] * len(existing_val) return param_set