mirror of
https://github.com/python-escpos/python-escpos
synced 2025-08-24 09:03:34 +00:00
Make the Escpos class accept a profile.
This is now used for the block_text function.
This commit is contained in:
@@ -15,6 +15,7 @@ from __future__ import unicode_literals
|
||||
from nose.tools import with_setup
|
||||
|
||||
import escpos.printer as printer
|
||||
from escpos.printer import Dummy
|
||||
import os
|
||||
|
||||
import filecmp
|
||||
@@ -43,3 +44,11 @@ def test_function_text_dies_ist_ein_test_lf():
|
||||
instance.text('Dies ist ein Test.\n')
|
||||
instance.flush()
|
||||
assert(filecmp.cmp('test/Dies ist ein Test.LF.txt', devfile))
|
||||
|
||||
|
||||
def test_block_text():
|
||||
printer = Dummy()
|
||||
printer.block_text(
|
||||
"All the presidents men were eating falafel for breakfast.", font='a')
|
||||
assert printer.output == \
|
||||
'All the presidents men were eating falafel\nfor breakfast.'
|
||||
|
Reference in New Issue
Block a user