mirror of
https://github.com/python-escpos/python-escpos
synced 2025-08-24 09:03:34 +00:00
Feature/clear content in dummy printer (#271)
Add Function to Dummy Printer for Clearing Buffer If you are using the dummy printer, you may want to use the printer again after sending the output to a physical printer. This method empties the list of the output buffer.
This commit is contained in:

committed by
Patrick Kanzler

parent
01e28bbcf6
commit
26d72a69f0
8
test/test_function_dummy_clear.py
Normal file
8
test/test_function_dummy_clear.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from nose.tools import assert_raises
|
||||
from escpos.printer import Dummy
|
||||
|
||||
def test_printer_dummy_clear():
|
||||
printer = Dummy()
|
||||
printer.text("Hello")
|
||||
printer.clear()
|
||||
assert(printer.output == b'')
|
Reference in New Issue
Block a user