def test_retry():
    calls = []

    def failing(n=1):
        if n < len(calls):
            calls.append(1)
            raise MyError
        return 1

    with pytest.raises(MyError): failing()
    calls = []
    assert retry(2, MyError)(failing)() == 1
    calls = []
    with pytest.raises(MyError): retry(2, MyError)(failing)(2)
dataset/ETHPy150Open Suor/funcy/tests/test_flow.py/test_retry/swapped operands of `<`