@@ -51,8 +51,7 @@ def generate_control_variables(value):
51
51
1 ,
52
52
),
53
53
(NTEnum ().wrap ({"index" : 0 , "choices" : ["YES" , "NO" , "MAYBE" ]}), False , 0 , 2 ),
54
- (NTScalar ("i" ).wrap ({"value" : np .int32 (10 )}), False , np .int32 (10 ), 1 ),
55
- ],
54
+ ], # Add cases for testing NTTable containing np.integer and np float types arrays here
56
55
)
57
56
def test_send_new_value (
58
57
monkeypatch : MonkeyPatch ,
@@ -79,14 +78,11 @@ def receive_signal(value_name: str, value_received: object):
79
78
nonlocal signals_received
80
79
signals_received += 1
81
80
82
- if isinstance (value_to_send , np .integer ):
83
- expected_value_type = type (np .integer )
84
- else :
85
- expected_value_type = type (value_to_send .value )
86
- if isinstance (value_to_send .value , list ):
87
- expected_value_type = np .ndarray
88
- elif "NTEnum" in value_to_send .getID ():
89
- expected_value_type = int
81
+ expected_value_type = type (value_to_send .value )
82
+ if isinstance (value_to_send .value , list ):
83
+ expected_value_type = np .ndarray
84
+ elif "NTEnum" in value_to_send .getID ():
85
+ expected_value_type = int
90
86
91
87
p4p_connection .new_value_signal [expected_value_type ].connect (functools .partial (receive_signal , "value" ))
92
88
p4p_connection .lower_alarm_limit_signal .connect (functools .partial (receive_signal , "low_alarm_limit" ))
0 commit comments