test for until

This commit is contained in:
Matthias Bisping 2022-04-13 13:12:19 +02:00
parent f5881f2229
commit b4f279c549

View File

@ -1,6 +1,8 @@
from funcy import rcompose from image_prediction.utils.generic import until
def test_rcompose(): def test_until():
f = rcompose(lambda x: x ** 2, str, lambda x: x * 2) def f(x):
assert f(3) == "99" return x / 2
assert until(lambda x, y: x - y == 0, f, 1) == 0