test for until
This commit is contained in:
parent
f5881f2229
commit
b4f279c549
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user