diff --git a/tests/test_utils_hastyepics.py b/tests/test_utils_hastyepics.py index 0a7b2033c..21e834178 100644 --- a/tests/test_utils_hastyepics.py +++ b/tests/test_utils_hastyepics.py @@ -58,11 +58,28 @@ def test_motor_init_list_has_no_disabled(): def test_motor_initializes_device_attrs(): # Check that Motor correctly initializes all Device PVs from _init_list m = Motor("TEST:MOTOR") + + # Debug prints + print("\n=== DEBUG INFO ===") + print("1. _init_list contents:", m._init_list) + print("2. All attributes on motor:", dir(m)) + print("3. PV objects state:") + for attr in m._init_list: + print(f"\nChecking attribute: {attr}") assert hasattr(m, attr), f"Motor is missing attribute: {attr}" pv = getattr(m, attr) + + # Additional PV debug info + print(f"PV object: {pv}") + if pv is not None: + print(f"PV name: {pv.pvname}") + print(f"PV connected: {pv.connected}") + assert isinstance(pv, epics.pv.PV), f"{attr} is not a valid PV object" assert not pv.connected, f"{attr} should not be connected yet" + + print("\n=== END DEBUG ===") def test_motor_pv_connection_skipped_by_default(): # PVs should not be connected right after Motor creation