@@ -181,7 +181,7 @@ def test_make_output_record(
181181 pv = "PV"
182182 _make_record (pv , attribute , on_update = update , out_record = True )
183183
184- kwargs .update (record_metadata_from_datatype (attribute .datatype ))
184+ kwargs .update (record_metadata_from_datatype (attribute .datatype , out_record = True ))
185185 kwargs .update (record_metadata_from_attribute (attribute ))
186186 kwargs .update ({"always_update" : True , "on_update" : update })
187187
@@ -266,7 +266,8 @@ def test_ioc(mocker: MockerFixture, epics_controller_api: ControllerAPI):
266266 epics_controller_api .attributes ["read_write_float" ]
267267 ),
268268 ** record_metadata_from_datatype (
269- epics_controller_api .attributes ["read_write_float" ].datatype
269+ epics_controller_api .attributes ["read_write_float" ].datatype ,
270+ out_record = True ,
270271 ),
271272 )
272273 builder .longIn .assert_any_call (
@@ -286,7 +287,7 @@ def test_ioc(mocker: MockerFixture, epics_controller_api: ControllerAPI):
286287 epics_controller_api .attributes ["read_write_int" ]
287288 ),
288289 ** record_metadata_from_datatype (
289- epics_controller_api .attributes ["read_write_int" ].datatype
290+ epics_controller_api .attributes ["read_write_int" ].datatype , out_record = True
290291 ),
291292 )
292293 builder .mbbIn .assert_called_once_with (
@@ -302,7 +303,7 @@ def test_ioc(mocker: MockerFixture, epics_controller_api: ControllerAPI):
302303 on_update = mocker .ANY ,
303304 ** record_metadata_from_attribute (epics_controller_api .attributes ["enum" ]),
304305 ** record_metadata_from_datatype (
305- epics_controller_api .attributes ["enum" ].datatype
306+ epics_controller_api .attributes ["enum" ].datatype , out_record = True
306307 ),
307308 )
308309 builder .boolOut .assert_called_once_with (
@@ -311,7 +312,7 @@ def test_ioc(mocker: MockerFixture, epics_controller_api: ControllerAPI):
311312 on_update = mocker .ANY ,
312313 ** record_metadata_from_attribute (epics_controller_api .attributes ["write_bool" ]),
313314 ** record_metadata_from_datatype (
314- epics_controller_api .attributes ["write_bool" ].datatype
315+ epics_controller_api .attributes ["write_bool" ].datatype , out_record = True
315316 ),
316317 )
317318 ioc_builder .Action .assert_any_call (
@@ -452,7 +453,8 @@ def test_long_pv_names_discarded(mocker: MockerFixture):
452453 always_update = True ,
453454 on_update = mocker .ANY ,
454455 ** record_metadata_from_datatype (
455- long_name_controller_api .attributes ["attr_rw_short_name" ].datatype
456+ long_name_controller_api .attributes ["attr_rw_short_name" ].datatype ,
457+ out_record = True ,
456458 ),
457459 ** record_metadata_from_attribute (
458460 long_name_controller_api .attributes ["attr_rw_short_name" ]
@@ -528,9 +530,9 @@ def test_update_datatype(mocker: MockerFixture):
528530 ** record_metadata_from_datatype (attr_r .datatype ),
529531 )
530532 record_r .set_field .assert_not_called ()
531- attr_r .update_datatype (Int (units = "m" , min = - 3 ))
533+ attr_r .update_datatype (Int (units = "m" , min_alarm = - 3 ))
532534 record_r .set_field .assert_any_call ("EGU" , "m" )
533- record_r .set_field .assert_any_call ("DRVL " , - 3 )
535+ record_r .set_field .assert_any_call ("LOPR " , - 3 )
534536
535537 with pytest .raises (
536538 ValueError ,
@@ -539,16 +541,17 @@ def test_update_datatype(mocker: MockerFixture):
539541 attr_r .update_datatype (String ()) # type: ignore
540542
541543 attr_w = AttrW (Int ())
542- record_w = _make_record (pv_name , attr_w , on_update = mocker .ANY )
544+ record_w = _make_record (pv_name , attr_w , on_update = mocker .ANY , out_record = True )
543545
544546 builder .longIn .assert_called_once_with (
545547 pv_name ,
546548 ** record_metadata_from_attribute (attr_w ),
547549 ** record_metadata_from_datatype (attr_w .datatype ),
548550 )
549551 record_w .set_field .assert_not_called ()
550- attr_w .update_datatype (Int (units = "m" , min = - 3 ))
552+ attr_w .update_datatype (Int (units = "m" , min_alarm = - 1 , min = - 3 ))
551553 record_w .set_field .assert_any_call ("EGU" , "m" )
554+ record_w .set_field .assert_any_call ("LOPR" , - 1 )
552555 record_w .set_field .assert_any_call ("DRVL" , - 3 )
553556
554557 with pytest .raises (
0 commit comments