Description:
A recent testing of the project identified several defects in the runtime functions and in the generator code . Below is a detailed description of the identified issues.
_resolve_rosettaattr: Most of the functions, in order to work with the input, use frames for the ‘self’ object. The _resolve_rosetta_attr, used to get an attribute from an object, doesn't support an object of type frame. This makes it impossible to access the atributes within the frame.
_check_one_ofconstraint: Similar to the previous situation, _check_one_ofconstraint is defined within the BaseDataModel context, the function fails to run on the provided input as it doesn't support the object of type frame.
_allelements: This function compares two lists, but the function compares the lists element by element. For example, if L1= [‘True’, ‘False’] and L2=[‘True’,’False’], the function would compare L1[0]=’True’ with L2[0]=’True’ and would proceed to compare L1[0]=’True’ with L2[1]=’False’, defining both the lists as different as the last comparison would be false.
_flattenlist: This function flattens lists of lists, but fails to flatten the lists when the input containts a nested list.
map operator: the map opertaor has an unexpected behaviour, ideally the operator should apply a function and return a map iterable. The current implementation, doesn't apply the function and returns the input without any changes.
_rosettafilter:The generation of the filter function, doesn't use the 'item' syntax within the lambda function logic. This results in an incorrect output.
Expected behaviour:
The python code generator and the runtime functions should fix the mentioned defects to ensure the expected results.
Description: A recent testing of the project identified several defects in the runtime functions and in the generator code . Below is a detailed description of the identified issues.
Expected behaviour: The python code generator and the runtime functions should fix the mentioned defects to ensure the expected results.