Пример #1
0
def test_unpack_invalid_endian():
    pwny.unpack('I', 'AAAA', endian='invalid')
Пример #2
0
def test_unpack_explicit_endian():
    assert pwny.unpack('I', b'ABCD',
                       endian=pwny.Target.Endian.big) == (0x41424344, )
Пример #3
0
def test_unpack_explicit_target():
    assert pwny.unpack('I', b'ABCD',
                       target=target_big_endian) == (0x41424344, )
Пример #4
0
def test_unpack():
    assert pwny.unpack('I', b'DCBA') == (0x41424344, )
Пример #5
0
def test_unpack_format_with_endian():
    assert pwny.unpack('>I', b'ABCD') == (0x41424344, )
Пример #6
0
def test_unpack_invalid_endian():
    pwny.unpack('I', 'AAAA', endian='invalid')
Пример #7
0
def test_unpack_explicit_target():
    assert pwny.unpack('I', b'ABCD', target=target_big_endian) == (0x41424344,)
Пример #8
0
def test_unpack_explicit_endian():
    assert pwny.unpack('I', b'ABCD', endian=pwny.Target.Endian.big) == (0x41424344,)
Пример #9
0
def test_unpack_format_with_endian():
    assert pwny.unpack('>I', b'ABCD') == (0x41424344,)
Пример #10
0
def test_unpack():
    assert pwny.unpack('I', b'DCBA') == (0x41424344,)