@@ -525,6 +525,7 @@ def test_exec_sed_task_with_preprocesssed_task(self):
525
525
mid_c = preprocessed_task .road_runner ['C' ]
526
526
mid_m = preprocessed_task .road_runner ['M' ]
527
527
mid_x = preprocessed_task .road_runner ['X' ]
528
+ self .assertIsInstance (mid_c , float )
528
529
529
530
variable_results , log = core .exec_sed_task (task , variables , preprocessed_task = preprocessed_task )
530
531
numpy .testing .assert_allclose (variable_results ['C' ][- 1 ], end_c )
@@ -562,6 +563,27 @@ def test_exec_sed_task_with_preprocesssed_task(self):
562
563
task .simulation .number_of_points + 1 ,
563
564
))
564
565
566
+ # check changes can be strings
567
+ task .model .changes = [
568
+ sedml_data_model .ModelAttributeChange (
569
+ target = "/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='C']" ,
570
+ target_namespaces = self .NAMESPACES ,
571
+ new_value = str (mid_c ),
572
+ ),
573
+ sedml_data_model .ModelAttributeChange (
574
+ target = "/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='M']" ,
575
+ target_namespaces = self .NAMESPACES ,
576
+ new_value = str (mid_m ),
577
+ ),
578
+ sedml_data_model .ModelAttributeChange (
579
+ target = "/sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='X']" ,
580
+ target_namespaces = self .NAMESPACES ,
581
+ new_value = str (mid_x ),
582
+ ),
583
+ ]
584
+ variable_results , log = core .exec_sed_task (task , variables , preprocessed_task = preprocessed_task )
585
+ numpy .testing .assert_allclose (variable_results ['C' ][- 1 ], end_c )
586
+
565
587
def test_exec_sedml_docs_in_combine_archive_successfully_with_biosimulators (self ):
566
588
doc , archive_filename = self ._build_combine_archive ()
567
589
0 commit comments