@@ -378,6 +378,12 @@ def run_test_function(
378378 timeout = TIMEOUT ,
379379 ** get_kwargs )
380380
381+ from cothread .dbr import ca_float , ca_array , ca_str , ca_int
382+ if type (rec_val ) in (ca_float , ca_array , ca_str , ca_int ):
383+ # '+' is used to convert values returned from cothread, which
384+ # are AugmentedValues, back into their Python native forms
385+ rec_val = + rec_val
386+
381387
382388 record_value_asserts (
383389 creation_func ,
@@ -397,13 +403,6 @@ def record_value_asserts(
397403 expected_type ):
398404 """Asserts that the expected value and expected type are matched with
399405 the actual value. Handles both scalar and waveform data"""
400- from cothread .dbr import ca_float , ca_array , ca_str , ca_int
401- if type (actual_value ) in (ca_float , ca_array , ca_str , ca_int ):
402- # '+' is used to convert values returned from cothread, which are
403- # AugmentedValues, back into their Python native forms
404- actual_value = + actual_value
405-
406-
407406 if type (expected_value ) == float and isnan (expected_value ):
408407 assert isnan (actual_value ) # NaN != Nan, so needs special case
409408 elif creation_func in [builder .WaveformOut , builder .WaveformIn ]:
0 commit comments