@@ -377,7 +377,7 @@ def test_invalid_additional_includes(self, yaml_path: str, expected_error_msg_pr
377
377
assert validation_result .error_messages ["*" ].startswith (expected_error_msg_prefix )
378
378
379
379
def test_component_input_types (self ) -> None :
380
- yaml_path = "./tests/test_configs/internal/component_with_input_types /component_spec.yaml"
380
+ yaml_path = "./tests/test_configs/internal/component_with_input_outputs /component_spec.yaml"
381
381
component : InternalComponent = load_component (yaml_path )
382
382
component .code = "scope:1"
383
383
@@ -403,7 +403,7 @@ def test_component_input_types(self) -> None:
403
403
assert component ._validate ().passed is True , repr (component ._validate ())
404
404
405
405
def test_component_input_with_attrs (self ) -> None :
406
- yaml_path = "./tests/test_configs/internal/component_with_input_types /component_spec_with_attrs.yaml"
406
+ yaml_path = "./tests/test_configs/internal/component_with_input_outputs /component_spec_with_attrs.yaml"
407
407
component : InternalComponent = load_component (source = yaml_path )
408
408
409
409
expected_inputs = {
@@ -433,6 +433,24 @@ def test_component_input_with_attrs(self) -> None:
433
433
assert regenerated_component ._to_rest_object ().properties .component_spec ["inputs" ] == expected_inputs ["inputs" ]
434
434
assert component ._validate ().passed is True , repr (component ._validate ())
435
435
436
+ def test_component_output_with_attrs (self ) -> None :
437
+ yaml_path = "./tests/test_configs/internal/component_with_input_outputs/component_spec_with_outputs.yaml"
438
+ component : InternalComponent = load_component (source = yaml_path )
439
+ assert component
440
+
441
+ expected_outputs = {
442
+ "primitive_is_control" : {
443
+ "is_control" : True ,
444
+ "type" : "boolean" ,
445
+ }
446
+ }
447
+ assert component ._to_rest_object ().properties .component_spec ["outputs" ] == expected_outputs
448
+ assert component ._validate ().passed is True , repr (component ._validate ())
449
+
450
+ regenerated_component = Component ._from_rest_object (component ._to_rest_object ())
451
+ assert regenerated_component ._to_rest_object ().properties .component_spec ["outputs" ] == expected_outputs
452
+ assert component ._validate ().passed is True , repr (component ._validate ())
453
+
436
454
def test_component_input_list_type (self ) -> None :
437
455
yaml_path = "./tests/test_configs/internal/scope-component/component_spec.yaml"
438
456
component : InternalComponent = load_component (yaml_path )
0 commit comments