Пример #1
0
def test_unpack_signed_max():
    assert S24BE.unpack(b"\x7f\xff\xff")[0] == 8388607
Пример #2
0
def test_unpack_signed_max():
    assert S24BE.unpack(b"\x7f\xff\xff")[0] == 8388607
Пример #3
0
def test_unpack_signed_min():
    assert S24BE.unpack(b"\x80\x00\x00")[0] == -8388608
Пример #4
0
def test_unpack_signed_min():
    assert S24BE.unpack(b"\x80\x00\x00")[0] == -8388608
Пример #5
0
def test_pack_signed_underflow():
    S24BE(-8388609)
Пример #6
0
def test_pack_signed_overflow():
    S24BE(8388608)
Пример #7
0
def test_pack_signed_max():
    assert S24BE(8388607) == b"\x7f\xff\xff"
Пример #8
0
def test_pack_signed_min():
    assert S24BE(-8388608) == b"\x80\x00\x00"