From 32cc334dd16e79326373bb08904c0dd9ed7f2bb4 Mon Sep 17 00:00:00 2001 From: belono Date: Sun, 22 Oct 2023 12:44:06 +0200 Subject: [PATCH] Add fixtures --- test/conftest.py | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/test/conftest.py b/test/conftest.py index c7db0e7..28ca8db 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -1,8 +1,48 @@ import pytest - -from escpos.printer import Dummy +from escpos.exceptions import DeviceNotFoundError +from escpos.printer import LP, CupsPrinter, Dummy, File, Network, Serial, Usb, Win32Raw @pytest.fixture def driver(): return Dummy() + + +@pytest.fixture +def usbprinter(): + return Usb() + + +@pytest.fixture +def serialprinter(): + return Serial() + + +@pytest.fixture +def networkprinter(): + return Network() + + +@pytest.fixture +def fileprinter(): + return File() + + +@pytest.fixture +def lpprinter(): + return LP() + + +@pytest.fixture +def win32rawprinter(): + return Win32Raw() + + +@pytest.fixture +def cupsprinter(): + return CupsPrinter() + + +@pytest.fixture +def devicenotfounderror(): + return DeviceNotFoundError