@@ -78,6 +78,17 @@ def record_func(request):
7878 """The list of record creation functions"""
7979 return request .param
8080
81+ # A list of all In records, used to filter out various tests
82+ in_records = [
83+ builder .aIn ,
84+ builder .boolIn ,
85+ builder .longIn ,
86+ builder .mbbIn ,
87+ builder .stringIn ,
88+ builder .WaveformIn ,
89+ builder .longStringIn ,
90+ ]
91+
8192def record_values_names (fixture_value ):
8293 """Provide a nice name for the tests in the record_values fixture"""
8394 return (
@@ -137,14 +148,14 @@ def record_values_names(fixture_value):
137148 "wIn_int" ,
138149 builder .WaveformIn ,
139150 567 ,
140- numpy .array ([567 ], dtype = numpy .int32 ),
151+ numpy .array ([567. ], dtype = numpy .float64 ),
141152 numpy .ndarray ,
142153 ),
143154 (
144155 "wOut_int" ,
145156 builder .WaveformOut ,
146157 567 ,
147- numpy .array ([567 ], dtype = numpy .int32 ),
158+ numpy .array ([567. ], dtype = numpy .float64 ),
148159 numpy .ndarray ,
149160 ),
150161 (
@@ -627,14 +638,7 @@ def test_value_post_init_caput(self):
627638 # caput blocks strings longer than 40 characters
628639 continue
629640
630- if item [1 ] not in [
631- builder .aIn ,
632- builder .boolIn ,
633- builder .longIn ,
634- builder .mbbIn ,
635- builder .stringIn ,
636- builder .WaveformIn ,
637- ]:
641+ if item [1 ] not in in_records :
638642 # In records block caput
639643 filtered_list .append (item )
640644
@@ -655,14 +659,7 @@ def test_value_post_init_set(self):
655659 for item in record_values_list :
656660 # .set() on In records doesn't update correctly.
657661 # pythonSoftIOC issue #67
658- if item [1 ] not in (
659- builder .aIn ,
660- builder .longIn ,
661- builder .boolIn ,
662- builder .stringIn ,
663- builder .mbbIn ,
664- builder .WaveformIn ,
665- ):
662+ if item [1 ] not in in_records :
666663 filtered_list .append (item )
667664
668665 run_test_function (
@@ -696,15 +693,7 @@ def test_value_post_init_caput(self):
696693 filtered_list = []
697694 for item in record_values_list :
698695 # In records block caputs
699- if item [1 ] not in [
700- builder .aIn ,
701- builder .boolIn ,
702- builder .longIn ,
703- builder .mbbIn ,
704- builder .stringIn ,
705- builder .WaveformIn ,
706- builder .longStringIn ,
707- ]:
696+ if item [1 ] not in in_records :
708697 filtered_list .append (item )
709698
710699 run_test_function (filtered_list , SetValueEnum .CAPUT , GetValueEnum .CAGET )
0 commit comments