1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-09-13 09:09:58 +00:00

Fix docstring warnings from QuantifedCode.

This commit is contained in:
Michael Elsdörfer
2016-08-30 17:55:58 +02:00
parent 1bd53697b9
commit c850a726cb
3 changed files with 12 additions and 1 deletions

View File

@@ -16,6 +16,8 @@ import pytest
b'\x1ba\x01\x1dh@\x1dw\x03\x1df\x00\x1dH\x02\x1dk\x024006381333931\x00')
])
def test_barcode(bctype, data, expected):
"""should generate different barcode types correctly.
"""
instance = printer.Dummy()
instance.barcode(data, bctype)
assert instance.output == expected
@@ -26,6 +28,8 @@ def test_barcode(bctype, data, expected):
('CODE128', False),
])
def test_lacks_support(bctype, supports_b):
"""should raise an error if the barcode type is not supported.
"""
profile = Profile(features={BARCODE_B: supports_b})
instance = printer.Dummy(profile=profile)
with pytest.raises(BarcodeTypeError):