Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Also check unwrapping for bytes type
  • Loading branch information
nielstron authored Sep 4, 2024
1 parent bdf142f commit ab31e1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opshin/tests/test_Unions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit ab31e1a

Please sign in to comment.