Coverage for skema/gromet/execution_engine/types/tuple.py: 90%

10 statements  

« prev     ^ index     » next       coverage.py v7.5.0, created at 2024-04-30 17:15 +0000

1from typing import Any, Tuple 

2 

3from skema.gromet.execution_engine.types.defined_types import Field 

4 

5 

6class new_Tuple(object): 

7 source_language_name = {"Python": "new_Tuple"} 

8 inputs = [Field("elements", "Any", True)] 

9 outputs = [Field("tuple_output", "Tuple")] 

10 shorthand = "new_Tuple" 

11 documentation = "" 

12 

13 def exec(*elements: Any) -> Tuple: 

14 return elements # Interestingly when passing variable sized arguments, it is passeed as a tuple