Esempio n. 1
0
def test_unpack_from():
    assert FourCC.unpack_from(b"A   ", 0)[0] == "A"
    assert FourCC.unpack_from(b"AB  ", 0)[0] == "AB"
    assert FourCC.unpack_from(b"ABC ", 0)[0] == "ABC"
    assert FourCC.unpack_from(b"ABCD", 0)[0] == "ABCD"
Esempio n. 2
0
def test_unpack():
    assert FourCC.unpack(b"A   ")[0] == "A"
    assert FourCC.unpack(b"AB  ")[0] == "AB"
    assert FourCC.unpack(b"ABC ")[0] == "ABC"
    assert FourCC.unpack(b"ABCD")[0] == "ABCD"
Esempio n. 3
0
def test_pack():
    assert FourCC("A") == b"A   "
    assert FourCC("AB") == b"AB  "
    assert FourCC("ABC") == b"ABC "
    assert FourCC("ABCD") == b"ABCD"
Esempio n. 4
0
def test_unpack_from():
    assert FourCC.unpack_from(b"A   ", 0)[0] == "A"
    assert FourCC.unpack_from(b"AB  ", 0)[0] == "AB"
    assert FourCC.unpack_from(b"ABC ", 0)[0] == "ABC"
    assert FourCC.unpack_from(b"ABCD", 0)[0] == "ABCD"
Esempio n. 5
0
def test_unpack():
    assert FourCC.unpack(b"A   ")[0] == "A"
    assert FourCC.unpack(b"AB  ")[0] == "AB"
    assert FourCC.unpack(b"ABC ")[0] == "ABC"
    assert FourCC.unpack(b"ABCD")[0] == "ABCD"
Esempio n. 6
0
def test_pack_overflow():
    assert FourCC("ABCDE") == b"ABCD"