python-escpos/test/test_function_dummy_clear.py
Christoph Heuel 26d72a69f0 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.
2017-12-04 00:13:28 +01:00

9 lines
205 B
Python

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'')