Skip to content

Commit 9723d7f

Browse files
committed
Fix testcase for new uplc version
1 parent 61ea528 commit 9723d7f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_stdlib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ def validator(x: str) -> bytes:
181181
self.assertEqual(ret, xs.encode(), "str.encode returned wrong value")
182182

183183
@given(xs=st.binary())
184+
@example(b"\x80")
184185
def test_bytes_decode(self, xs):
185186
source_code = """
186187
def validator(x: bytes) -> str:
@@ -192,7 +193,7 @@ def validator(x: bytes) -> str:
192193
exp = None
193194
try:
194195
ret = eval_uplc_value(source_code, xs).decode()
195-
except UnicodeDecodeError:
196+
except (UnicodeDecodeError, RuntimeError):
196197
ret = None
197198
self.assertEqual(ret, exp, "bytes.decode returned wrong value")
198199

0 commit comments

Comments
 (0)