def test_wf1_branches_failing():

    @task
    def t1(a: int) -> typing.NamedTuple('OutputsBC', t1_int_output=int, c=str):
        return ((a + 2), 'world')

    @task
    def t2(a: str) -> str:
        return a

    @workflow
    def my_wf(a: int, b: str) -> (int, str):
        (x, y) = t1(a=a)
        d = conditional('test1').if_((x == 4)).then(t2(a=b)).elif_((x >= 5)).then(t2(a=y)).else_().fail('All Branches failed')
        return (x, d)
    with pytest.raises(ValueError):
        my_wf(a=1, b='hello ')
def test_wf1_branches_failing():

    @task
    def t1(a: int) -> typing.NamedTuple('OutputsBC', t1_int_output=int, c=str):
        return ((a + 2), 'world')

    @task
    def t2(a: str) -> str:
        return a

    @workflow
    def my_wf(a: int, b: str) -> (int, str):
        (x, y) = t1(a=a)
        d = conditional('test1').if_((x == 4)).then(t2(a=b)).elif_((x >= 5)).then(t2(a=y)).else_().fail('All Branches failed')
        return (x, d)
    with pytest.raises(ValueError):
        my_wf(a=1, b='hello ')