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 import pytest
def test_soft_barcode(): @pytest.fixture
"""just execute soft_barcode def instance():
""" return printer.Dummy()
instance = printer.Dummy()
def test_soft_barcode_ean8(instance):
instance.soft_barcode("ean8", "1234") instance.soft_barcode("ean8", "1234")