mirror of
https://github.com/python-escpos/python-escpos
synced 2025-08-24 09:03:34 +00:00
* Merge software and hardware barcodes to one method * Fix wrong sw barcode heigh/width * Add missing param to _sw_barcode call * Make barcode() smarter, improvements and clean up * Use param font_size in sw_barcode() * Update docstrings * Update barcode examples and docs * Add --force_software option to CLI * Attempt to match the sw and hw barcode sizes * Better approximation to native font size * Fix docs build * Update tests at test_function_softbarcode * Fix exception * Move image dpi setting to writter_options * Fix _sw_barcode() docstring param * Fix wrong default param in docstring * improve linkage in documentation --------- Co-authored-by: Patrick Kanzler <4189642+patkan@users.noreply.github.com> Co-authored-by: Patrick Kanzler <dev@pkanzler.de>
This commit is contained in:
@@ -13,13 +13,13 @@ def instance():
|
||||
def test_soft_barcode_ean8_invalid(instance):
|
||||
"""test with an invalid barcode"""
|
||||
with pytest.raises(barcode.errors.BarcodeError):
|
||||
instance.soft_barcode("ean8", "1234")
|
||||
instance.barcode("1234", "ean8", force_software=True)
|
||||
|
||||
|
||||
def test_soft_barcode_ean8(instance):
|
||||
"""test with a valid ean8 barcode"""
|
||||
instance.soft_barcode("ean8", "1234567")
|
||||
instance.barcode("1234567", "ean8", force_software=True)
|
||||
|
||||
|
||||
def test_soft_barcode_ean8_nocenter(instance):
|
||||
instance.soft_barcode("ean8", "1234567", center=False)
|
||||
instance.barcode("1234567", "ean8", align_ct=False, force_software=True)
|
||||
|
Reference in New Issue
Block a user