MCPcopy Index your code
hub / github.com/lincolnloop/python-qrcode / test_optimize_short

Function test_optimize_short

qrcode/tests/test_qrcode.py:157–168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

155
156
157def test_optimize_short():
158 qr = qrcode.QRCode()
159 text = "A1abc1234567def1HELLOa"
160 qr.add_data(text, optimize=7)
161 qr.make()
162 assert len(qr.data_list) == 3
163 assert [d.mode for d in qr.data_list] == [
164 MODE_8BIT_BYTE,
165 MODE_NUMBER,
166 MODE_8BIT_BYTE,
167 ]
168 assert qr.version == 2
169
170
171def test_optimize_longer_than_data():

Callers

nothing calls this directly

Calls 2

add_dataMethod · 0.95
makeMethod · 0.95

Tested by

no test coverage detected