From ab31e1ac35b4953e04a7fc6af8e851f205423593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=BCndler?= Date: Wed, 4 Sep 2024 21:24:58 +0200 Subject: [PATCH] Apply suggestions from code review Also check unwrapping for bytes type --- opshin/tests/test_Unions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opshin/tests/test_Unions.py b/opshin/tests/test_Unions.py index ef3b8930..a51ed7a8 100644 --- a/opshin/tests/test_Unions.py +++ b/opshin/tests/test_Unions.py @@ -318,9 +318,9 @@ def validator(x: Union[int,bytes]) -> int: if isinstance(x, int): k = x+5 elif isinstance(x, bytes): - k = 7 + k = len(x) return k """ res = eval_uplc_value(source_code, x) - real = x + 5 if isinstance(x, int) else 7 + real = x + 5 if isinstance(x, int) else len(x) self.assertEqual(res, real)