Skip to content

Commit

Permalink
add test for printing ValueError from CLVM
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Jul 8, 2024
1 parent 877a0dd commit 24135fd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,14 @@ def test_raise_program() -> None:
assert False
except ValueError as e:
assert f"{e}" == "('clvm raise', '86666f6f626172')"


def test_repr() -> None:
temp = Program.to([8, (1, "foo")])
assert f"{temp}" == "Program(ff08ffff0183666f6f80)"

try:
run_chia_program(bytes(temp), bytes.fromhex("00"), 1100000000, 0)
assert False
except ValueError as e:
assert f"{e}" == "('clvm raise', '83666f6f')"

0 comments on commit 24135fd

Please sign in to comment.