9 lines
151 B
Python

from image_prediction.utils.generic import until
def test_until():
def f(x):
return x / 2
assert until(lambda x: x == 0, f, 1) == 0