#!/usr/bin/python """tests for line display :author: `Patrick Kanzler `_ :organization: `python-escpos `_ :copyright: Copyright (c) 2017 `python-escpos `_ :license: MIT """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import escpos.printer as printer def test_function_linedisplay_select_on(): """test the linedisplay_select function (activate)""" instance = printer.Dummy() instance.linedisplay_select(select_display=True) assert(instance.output == b'\x1B\x3D\x02') def test_function_linedisplay_select_off(): """test the linedisplay_select function (deactivate)""" instance = printer.Dummy() instance.linedisplay_select(select_display=False) assert(instance.output == b'\x1B\x3D\x01') def test_function_linedisplay_clear(): """test the linedisplay_clear function""" instance = printer.Dummy() instance.linedisplay_clear() assert(instance.output == b'\x1B\x40')