def METHOD_NAME(my_resources):
    caught = False
    try:
        pulumi.runtime.invoke("test:index:FailFunction", props={})
    except Exception as e:
        caught = str(e)
    assert 'this function fails!' in caught