def test_hello_typed_bad_structure(): with pytest.raises( PipelineConfigEvaluationError, match='Value for selector type String.InputSchema must be a dict', ): execute_pipeline( define_hello_typed_inputs_pipeline(), { 'solids': { 'add_hello_to_word_typed': { 'inputs': { 'word': {'Foobar Baz'} } } } }, )
def test_hello_typed(): result = execute_pipeline( define_hello_typed_inputs_pipeline(), { 'solids': { 'add_hello_to_word_typed': { 'inputs': { 'word': { 'value': 'Foobar Baz' } } } } }, ) assert result.success assert len(result.solid_result_list) == 1 assert (result.result_for_solid( 'add_hello_to_word_typed').transformed_value() == 'Hello, Foobar Baz!')
def test_hello_typed_inputs(): with pytest.raises( PipelineConfigEvaluationError, match= ('Type failure at path ' '"root:solids:add_hello_to_word_typed:inputs:word:value" on type "String"' ), ): execute_pipeline( define_hello_typed_inputs_pipeline(), { 'solids': { 'add_hello_to_word_typed': { 'inputs': { 'word': { 'value': 343 } } } } }, )