def test_engine_file_output():
    basic_blob_type = _core_types.BlobType(format='', dimensionality=_core_types.BlobType.BlobDimensionality.SINGLE)
    fs = FileAccessProvider(local_sandbox_dir='/tmp/flytetesting')
    with context_manager.FlyteContext.current_context().new_file_access_context(file_access_provider=fs) as ctx:
        test_file_location = '/tmp/sample.txt'
        with open(test_file_location, 'w') as fh:
            fh.write('Hello World\n')
        lit = TypeEngine.to_literal(ctx, test_file_location, os.PathLike, LiteralType(blob=basic_blob_type))
        with open(lit.scalar.blob.uri, 'r') as fh:
            assert (fh.readline() == 'Hello World\n')
        redownloaded_local_file_location = TypeEngine.to_python_value(ctx, lit, os.PathLike)
        with open(redownloaded_local_file_location, 'r') as fh:
            assert (fh.readline() == 'Hello World\n')
def test_engine_file_output():
    basic_blob_type = _core_types.BlobType(format=, dimensionality=_core_types.BlobType.BlobDimensionality.SINGLE)
    fs = FileAccessProvider(local_sandbox_dir='/tmp/flytetesting')
    with context_manager.FlyteContext.current_context().new_file_access_context(file_access_provider=fs) as ctx:
        test_file_location = '/tmp/sample.txt'
        with open(test_file_location, 'w') as fh:
            fh.write('Hello World\n')
        lit = TypeEngine.to_literal(ctx, test_file_location, os.PathLike, LiteralType(blob=basic_blob_type))
        with open(lit.scalar.blob.uri, 'r') as fh:
            assert (fh.readline() == 'Hello World\n')
        redownloaded_local_file_location = TypeEngine.to_python_value(ctx, lit, os.PathLike)
        with open(redownloaded_local_file_location, 'r') as fh:
            assert (fh.readline() == 'Hello World\n')