def test_write_pad_codewords_standard_value_i3(): # See ISO/IEC 18004:2006(E) -- I.3 Encoding a Micro QR Code symbol (page 96) data = bits('0100000000011000101011001100001100000000') buff = Buffer(data) version = consts.VERSION_M2 error = consts.ERROR_LEVEL_L capacity = consts.SYMBOL_CAPACITY[version][error] encoder.write_pad_codewords(buff, version, capacity, len(buff)) assert data == buff.getbits()
def test_write_pad_codewords_standard_value_i3(): # See ISO/IEC 18004:2006(E) -- I.3 Encoding a Micro QR Code symbol (page 96) data = bits('0100000000011000101011001100001100000000') buff = Buffer(data) version = consts.VERSION_M2 error = consts.ERROR_LEVEL_L capacity = consts.SYMBOL_CAPACITY[version][error] encoder.write_pad_codewords(buff, version, capacity, len(buff)) assert data == buff.getbits()
def test_write_pad_codewords_standard_value_i2(): # See ISO/IEC 18004:2006(E) -- I.2 Encoding a QR Code symbol (page 94) data = bits('00010000 00100000 00001100 01010110 01100001 10000000') buff = Buffer(data) version = 1 error = consts.ERROR_LEVEL_M capacity = consts.SYMBOL_CAPACITY[version][error] encoder.write_pad_codewords(buff, version, capacity, len(buff)) assert data + bits('11101100000100011110110000010001111011000001000111101100000100011110110000010001') == buff.getbits()
def test_write_pad_codewords_standard_value_i2(): # See ISO/IEC 18004:2006(E) -- I.2 Encoding a QR Code symbol (page 94) data = bits('00010000 00100000 00001100 01010110 01100001 10000000') buff = Buffer(data) version = 1 error = consts.ERROR_LEVEL_M capacity = consts.SYMBOL_CAPACITY[version][error] encoder.write_pad_codewords(buff, version, capacity, len(buff)) assert data + bits('11101100000100011110110000010001111011000001000111101100000100011110110000010001') == buff.getbits()