def METHOD_NAME(raised, expected):
    @cli.handle_errors()
    def raise_exc():
        raise exceptions.ProcrastinateException("foo") from IndexError("bar")
    with pytest.raises(click.ClickException) as exc:
        raise_exc()
    assert str(exc.value) == "foo\nbar"