Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/qrcode/__init__.py: 50%
12 statements
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
1from qrcode.main import QRCode
2from qrcode.main import make # noqa
3from qrcode.constants import ( # noqa
4 ERROR_CORRECT_L, ERROR_CORRECT_M, ERROR_CORRECT_Q, ERROR_CORRECT_H)
6from qrcode import image # noqa
9def run_example(data="http://www.lincolnloop.com", *args, **kwargs):
10 """
11 Build an example QR Code and display it.
13 There's an even easier way than the code here though: just use the ``make``
14 shortcut.
15 """
16 qr = QRCode(*args, **kwargs)
17 qr.add_data(data)
19 im = qr.make_image()
20 im.show()
23if __name__ == '__main__': # pragma: no cover 23 ↛ 24line 23 didn't jump to line 24, because the condition on line 23 was never true
24 import sys
25 run_example(*sys.argv[1:])