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():
|
||||
f = rcompose(lambda x: x ** 2, str, lambda x: x * 2)
|
||||
assert f(3) == "99"
|
||||
def test_until():
|
||||
def f(x):
|
||||
return x / 2
|
||||
|
||||
assert until(lambda x, y: x - y == 0, f, 1) == 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user