示例#1
0
def test_unpack_unsigned_max():
    assert U24LE.unpack(b"\xff\xff\xff")[0] == 16777215
示例#2
0
def test_pack_unsigned_min():
    assert U24LE(0) == b"\x00\x00\x00"
示例#3
0
def test_unpack_unsigned_min():
    assert U24LE.unpack(b"\x00\x00\x00")[0] == 0
示例#4
0
def test_unpack_unsigned_max():
    assert U24LE.unpack(b"\xff\xff\xff")[0] == 16777215
示例#5
0
def test_unpack_unsigned_min():
    assert U24LE.unpack(b"\x00\x00\x00")[0] == 0
示例#6
0
def test_pack_unsigned_underflow():
    U24LE(-1)
示例#7
0
def test_pack_unsigned_overflow():
    U24LE(16777216)
示例#8
0
def test_pack_unsigned_max():
    assert U24LE(16777215) == b"\xff\xff\xff"