test_function_softbarcode: use pytest fixture
This commit is contained in:
parent
725f1254aa
commit
ab30ef4a8c
|
@ -4,9 +4,11 @@ import escpos.printer as printer
|
|||
import pytest
|
||||
|
||||
|
||||
def test_soft_barcode():
|
||||
"""just execute soft_barcode
|
||||
"""
|
||||
instance = printer.Dummy()
|
||||
@pytest.fixture
|
||||
def instance():
|
||||
return printer.Dummy()
|
||||
|
||||
|
||||
def test_soft_barcode_ean8(instance):
|
||||
instance.soft_barcode("ean8", "1234")
|
||||
|
||||
|
|
Loading…
Reference in New Issue