MCPcopy Create free account
hub / github.com/QuipNetwork/xquad / test_bytecode_decode_truncated

Function test_bytecode_decode_truncated

xqvm_py/tests/test_program.py:63–68  ·  view source on GitHub ↗

Truncated operands in the payload raise ValueError.

()

Source from the content-addressed store, hash-verified

61
62
63def test_bytecode_decode_truncated():
64 """Truncated operands in the payload raise ValueError."""
65 import pytest
66
67 with pytest.raises(ValueError, match="truncated operands"):
68 program_from_bytecode(_make_xqbc(bytes([0x11]))) # PUSH1 needs 1 operand byte
69
70
71def test_bytecode_decode_bad_magic():

Callers

nothing calls this directly

Calls 3

program_from_bytecodeFunction · 0.90
_make_xqbcFunction · 0.85
bytesFunction · 0.85

Tested by

no test coverage detected