Files
chia-blockchain/chia/_tests/util/test_errors.py
Kyle AltendorfandGitHub e446d6b726 use chia_rs directly for sized ints (#19303)
* use chia_rs directly for sized ints

* Update data_layer_rpc_api.py
2025-02-24 14:33:09 -08:00

12 lines
326 B
Python

from __future__ import annotations
from chia_rs.sized_ints import int16
from chia.util.errors import Err
def test_error_codes_int16() -> None:
# Make sure all Err codes fit into int16 because its part of the ProtocolMessageTypes.error message structure
for err in Err:
assert int16(err.value) == err.value