def test_short_form_pack():
    for width, num, bytestr in short_signed_data:
        f = 'p%d' % width
        yield check_short_form_pack, f, num, bytestr[::-1]
        yield check_short_form_pack_endian, f, num, bytestr[::-1], pwny.Target.Endian.little
        yield check_short_form_pack_endian, f, num, bytestr, pwny.Target.Endian.big

    for width, num, bytestr in short_unsigned_data:
        f = 'P%d' % width
        yield check_short_form_pack, f, num, bytestr[::-1]
        yield check_short_form_pack_endian, f, num, bytestr[::-1], pwny.Target.Endian.little
        yield check_short_form_pack_endian, f, num, bytestr, pwny.Target.Endian.big