2
0
mirror of https://github.com/status-im/eth2.0-specs.git synced 2025-01-23 09:01:17 +00:00

15 lines
506 B
Python

from ssz_test_case import valid_test_case, invalid_test_case
from eth2spec.utils.ssz.ssz_typing import boolean
def valid_cases():
yield "true", valid_test_case(lambda: boolean(True))
yield "false", valid_test_case(lambda: boolean(False))
def invalid_cases():
yield "byte_2", invalid_test_case(lambda: b'\x02')
yield "byte_rev_nibble", invalid_test_case(lambda: b'\x10')
yield "byte_0x80", invalid_test_case(lambda: b'\x80')
yield "byte_full", invalid_test_case(lambda: b'\xff')