diff --git a/tests/test_parse_inputs.py b/tests/test_parse_inputs.py index c2d0acf..d5c952d 100644 --- a/tests/test_parse_inputs.py +++ b/tests/test_parse_inputs.py @@ -122,10 +122,7 @@ def test_with_3_parameters(): a, 3, 1 -> aaaa """ - def to_int(s: str, t: type = str): - assert type(s) is t - return int(s) - + counter = 0 def to(tin: type, tout: type): def wrapped(input): @@ -136,8 +133,10 @@ def wrapped(input): return wrapped parse = Parse.doc_string(auto_approve=True) - parse.transform3( to(str, str), to(str, int), to(str, int)).verify_all(lambda a, b, c: to(str, str)(a) * (to(int, int)(b) + to(int, int)(c))) + parse.transform3( to(str, str), to(str, str), to(str, str))\ + .transform3( to(str, str), to(str, int), to(str, int))\ + .verify_all(lambda a, b, c: to(str, str)(a) * (to(int, int)(b) + to(int, int)(c))) - assert counter == 6 + assert counter == 9 # assert on all the paramaters