python-escpos/test/conftest.py
Patrick Kanzler 0c824cf295
More mypy (#612)
* remove type comment where type is annotated
* move function tests
* remove six from tests
* add none annotations
* add more types
* change mock (so that mypy understands it)
2023-12-16 23:09:20 +01:00

50 lines
735 B
Python

import pytest
from escpos.exceptions import DeviceNotFoundError
from escpos.printer import LP, CupsPrinter, Dummy, File, Network, Serial, Usb, Win32Raw
@pytest.fixture
def driver() -> Dummy:
return Dummy()
@pytest.fixture
def usbprinter() -> Usb:
return Usb()
@pytest.fixture
def serialprinter() -> Serial:
return Serial()
@pytest.fixture
def networkprinter() -> Network:
return Network()
@pytest.fixture
def fileprinter() -> File:
return File()
@pytest.fixture
def lpprinter() -> LP:
return LP()
@pytest.fixture
def win32rawprinter():
return Win32Raw()
@pytest.fixture
def cupsprinter():
return CupsPrinter()
@pytest.fixture
def devicenotfounderror():
return DeviceNotFoundError