Esempio n. 1
0
def execution_data_locations():
    with test_utils.LocalTestFileSystem() as fs:
        input_filename = fs.get_named_tempfile("inputs.pb")
        output_filename = fs.get_named_tempfile("outputs.pb")
        utils.write_proto_to_file(_INPUT_MAP.to_flyte_idl(), input_filename)
        utils.write_proto_to_file(_OUTPUT_MAP.to_flyte_idl(), output_filename)
        yield (_common_models.UrlBlob(input_filename, 100),
               _common_models.UrlBlob(output_filename, 100))
Esempio n. 2
0
def test_task_execution_data_response():
    input_blob = _common_models.UrlBlob("in", 1)
    output_blob = _common_models.UrlBlob("out", 2)
    obj = _execution.TaskExecutionGetDataResponse(input_blob, output_blob)
    obj2 = _execution.TaskExecutionGetDataResponse.from_flyte_idl(
        obj.to_flyte_idl())
    assert obj == obj2
    assert obj2.inputs == input_blob
    assert obj2.outputs == output_blob
Esempio n. 3
0
def test_node_execution_data_response():
    input_blob = _common_models.UrlBlob("in", 1)
    output_blob = _common_models.UrlBlob("out", 2)
    obj = _execution.NodeExecutionGetDataResponse(input_blob, output_blob, _INPUT_MAP, _OUTPUT_MAP)
    obj2 = _execution.NodeExecutionGetDataResponse.from_flyte_idl(obj.to_flyte_idl())
    assert obj == obj2
    assert obj2.inputs == input_blob
    assert obj2.outputs == output_blob
    assert obj2.full_inputs == _INPUT_MAP
    assert obj2.full_outputs == _OUTPUT_MAP