From 5f9d1f11c438d355ecb6310f689fe936c105799d Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Wed, 22 Nov 2023 12:59:40 -0800 Subject: [PATCH] remove dupe tests --- .../unit/script/types/test_custom_function.py | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/tests/unit/script/types/test_custom_function.py b/tests/unit/script/types/test_custom_function.py index 7246c5a3..26cbbba9 100644 --- a/tests/unit/script/types/test_custom_function.py +++ b/tests/unit/script/types/test_custom_function.py @@ -66,47 +66,3 @@ class TestCustomFunction: "output": "{%cycle_func0(1)}", } ).resolve() - - def test_lambda_with_custom_function(self): - assert Script( - {"%times_two": "{%mul($0, 2)}", "wip": "{%array_apply([1, 2, 3], %times_two)}"} - ).resolve() == {"wip": ResolvedArray([Integer(2), Integer(4), Integer(6)])} - - def test_conditional_lambda_with_custom_functions(self): - assert Script( - { - "%times_three": "{%mul($0, 3)}", - "%times_two": "{%mul($0, 2)}", - "wip": "{%array_apply([1, 2, 3], %if(False, %times_two, %times_three))}", - } - ).resolve() == {"wip": ResolvedArray([Integer(3), Integer(6), Integer(9)])} - - def test_nested_custom_functions(self): - assert Script( - { - "%times_three": "{%mul($0, 3)}", - "%times_two": "{%mul($0, 2)}", - "identity": "{%times_three(%times_two(1))}", - } - ).resolve() == {"identity": Integer(6)} - - def test_nested_custom_functions_within_custom_functions(self): - assert Script( - { - "%power_2": "{%mul($0, 2)}", - "%power_3": "{%mul(%power_2($0), 2)}", - "%power_4": "{%mul(%power_3($0), 2)}", - "power_of_4": "{%power_4(2)}", - } - ).resolve() == {"power_of_4": Integer(16)} - - def test_nested_lambda_custom_functions_within_custom_functions(self): - assert Script( - { - "%nest4": "{%mul($0, 2)}", - "%nest3": "{%array_at(%array_apply([$0], %nest4), 0)}", - "%nest2": "{%array_at(%array_apply([$0], %nest3), 0)}", - "%nest1": "{%array_at(%array_apply([$0], %nest2), 0)}", - "output": "{%array_at(%array_apply([2], %nest1), 0)}", - } - ).resolve() == {"output": Integer(4)}