test_function_softbarcode: use pytest fixture

This commit is contained in:
Romain Porte 2020-05-10 14:05:33 +02:00
parent 725f1254aa
commit ab30ef4a8c
1 changed files with 6 additions and 4 deletions

View File

@ -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")