1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-09-13 09:09:58 +00:00

Merge branch 'capabilities' into text-encoding

This commit is contained in:
Michael Elsdörfer
2016-08-30 13:36:53 +02:00
13 changed files with 277 additions and 276 deletions

View File

@@ -16,13 +16,12 @@ import mock
from hypothesis import given
import hypothesis.strategies as st
from escpos.printer import Dummy
import escpos.printer as printer
@given(text=st.text())
def test_function_text_dies_ist_ein_test_lf(text):
"""test the text printing function with simple string and compare output"""
instance = printer.Dummy()
instance = Dummy()
instance.magic.encode_text = mock.Mock()
instance.text(text)
instance.magic.encode_text.assert_called_with(txt=text)
@@ -33,4 +32,4 @@ def test_block_text():
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.'
b'All the presidents men were eating falafel\nfor breakfast.'