def test_single_output():

    @task
    def my_task() -> str:
        return 'Hello world'
    assert (my_task() == 'Hello world')
    ctx = context_manager.FlyteContext.current_context()
    with ctx.new_compilation_context() as ctx:
        outputs = my_task()
        assert (ctx.compilation_state is not None)
        nodes = ctx.compilation_state.nodes
        assert (len(nodes) == 1)
        assert (outputs.is_ready is False)
        assert (outputs.ref.node is nodes[0])
def test_single_output():

    @task
    def my_task() -> str:
        return 'Hello world'
    assert (my_task() == 'Hello world')
    ctx = context_manager.FlyteContext.current_context()
    with ctx.new_compilation_context() as ctx:
        outputs = my_task()
        assert (ctx.compilation_state is not None)
        nodes = ctx.compilation_state.nodes
        assert (len(nodes) == 1)
        assert (outputs.is_ready is False)
        assert (outputs.ref.node is nodes[0])