From 16c82d493f7c0159deb9d4c4e54f90e708341779 Mon Sep 17 00:00:00 2001 From: Las Date: Mon, 23 Sep 2019 19:10:27 +0900 Subject: [PATCH 1/2] Update test_underscore.py --- lazy/test_underscore.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lazy/test_underscore.py b/lazy/test_underscore.py index 3e3969d..a303c8b 100644 --- a/lazy/test_underscore.py +++ b/lazy/test_underscore.py @@ -30,20 +30,20 @@ def test_underscore_with_functions(): def add(x, y): return x + y - f = F(str)(_ + 3) + f = str(_ + 3) assert f(2) == "5" - f = F(add)(_, 3) + f = add(_, 3) assert f(2) == 5 - f = F(add)(x=_, y=3) + f = add(x=_, y=3) assert f(2) == 5 - f = F(add)(_, y=3) + f = add(_, y=3) assert f(2) == 5 - assert list(map(F(str)(_ * 2), [1, 2, 3])) == ['2', '4', '6'] - assert list(map(F(str)(_ * _), [1, 2, 3])) == ['1', '4', '9'] - assert list(map(F(add)(1, _ * 2), [1, 2, 3])) == [3, 5, 7] - assert list(map(F(add)(_ * 2, 4), [1, 2, 3])) == [6, 8, 10] - assert list(map(F(add)(_ * 3, _ + 2), [1, 2, 3])) == [6, 10, 14] + assert list(map(str(_ * 2), [1, 2, 3])) == ['2', '4', '6'] + assert list(map(str(_ * _), [1, 2, 3])) == ['1', '4', '9'] + assert list(map(add(1, _ * 2), [1, 2, 3])) == [3, 5, 7] + assert list(map(add(_ * 2, 4), [1, 2, 3])) == [6, 8, 10] + assert list(map(add(_ * 3, _ + 2), [1, 2, 3])) == [6, 10, 14] From faf60336b5a4f35a744c0b16fd64f14094f665ec Mon Sep 17 00:00:00 2001 From: Las Date: Mon, 23 Sep 2019 22:03:17 +0900 Subject: [PATCH 2/2] Update test_underscore.py --- lazy/test_underscore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lazy/test_underscore.py b/lazy/test_underscore.py index a303c8b..5a75e60 100644 --- a/lazy/test_underscore.py +++ b/lazy/test_underscore.py @@ -1,4 +1,4 @@ -from .lazy import _, F +from .lazy import dsl def test_underscore_calculate():