From 0a8f456a67d0ebd2948186e93ab7b73135bafad0 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Fri, 25 Jul 2025 17:41:02 +0200 Subject: [PATCH] Update tests/test_utils_lazypv.py --- tests/test_utils_lazypv.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/tests/test_utils_lazypv.py b/tests/test_utils_lazypv.py index fb559a69c..6d3fe2e6c 100644 --- a/tests/test_utils_lazypv.py +++ b/tests/test_utils_lazypv.py @@ -47,33 +47,6 @@ def test_getattr(): assert isinstance(timeout, (float, int)) assert timeout == 3.0 - # Have the get() method from (__getattr__) to get all the parameters in a dict - get_method = pv.__getattr__('get') - assert callable(get_method) # Check if it's really a function - - result = get_method(timeout=3.0) - assert isinstance(result, dict), "Expected dict because form='time'" - - # Full check of expected fields - assert 'value' in result - assert 'timestamp' in result - assert 'status' in result - assert 'severity' in result - - value = result['value'] - timestamp = result['timestamp'] - status = result['status'] - severity = result['severity'] - - assert isinstance(value, (int, float)), "Value should be numeric" - assert isinstance(timestamp, (int, float)), "Timestamp should be numeric" - assert isinstance(status, int), "Status should be int" - assert isinstance(severity, int), "Severity should be int" - - # Confirm PV not re-instantiated on second getattr - second_get = pv.__getattr__('get') - assert get_method is second_get - # Remove the instantiated PV del pv._pv pv._pv = None