Skip to content

Commit

Permalink
Remove faulty test, add comment for future inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
slactjohnson committed Jan 24, 2025
1 parent 26640a6 commit f196c2e
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions pydm/tests/data_plugins/test_p4p_plugin_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def generate_control_variables(value):
1,
),
(NTEnum().wrap({"index": 0, "choices": ["YES", "NO", "MAYBE"]}), False, 0, 2),
(NTScalar("i").wrap({"value": np.int32(10)}), False, np.int32(10), 1),
],
], # Add cases for testing NTTable containing np.integer and np float types arrays here
)
def test_send_new_value(
monkeypatch: MonkeyPatch,
Expand All @@ -79,14 +78,11 @@ def receive_signal(value_name: str, value_received: object):
nonlocal signals_received
signals_received += 1

if isinstance(value_to_send, np.integer):
expected_value_type = type(np.integer)
else:
expected_value_type = type(value_to_send.value)
if isinstance(value_to_send.value, list):
expected_value_type = np.ndarray
elif "NTEnum" in value_to_send.getID():
expected_value_type = int
expected_value_type = type(value_to_send.value)
if isinstance(value_to_send.value, list):
expected_value_type = np.ndarray
elif "NTEnum" in value_to_send.getID():
expected_value_type = int

p4p_connection.new_value_signal[expected_value_type].connect(functools.partial(receive_signal, "value"))
p4p_connection.lower_alarm_limit_signal.connect(functools.partial(receive_signal, "low_alarm_limit"))
Expand Down

0 comments on commit f196c2e

Please sign in to comment.