1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-08-24 09:03:34 +00:00

remove image handling support

This commit is contained in:
Michael Billington
2016-04-03 14:29:17 +10:00
parent 2aa0878f54
commit 59afcf778f
5 changed files with 1 additions and 253 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 653 B

View File

@@ -1,50 +0,0 @@
#!/usr/bin/python
"""tests for the image printing function
:author: `Patrick Kanzler <patrick.kanzler@fablab.fau.de>`_
:organization: `python-escpos <https://github.com/python-escpos>`_
:copyright: Copyright (c) 2016 `python-escpos <https://github.com/python-escpos>`_
:license: GNU GPL v3
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from nose.tools import with_setup
import escpos.printer as printer
import os
devfile = 'testfile'
def setup_testfile():
"""create a testfile as devfile"""
fhandle = open(devfile, 'a')
try:
os.utime(devfile, None)
finally:
fhandle.close()
def teardown_testfile():
"""destroy testfile again"""
os.remove(devfile)
@with_setup(setup_testfile, teardown_testfile)
def test_function_image_with_50x50_png():
"""test the image function with 50x50.png (grayscale png)"""
instance = printer.File(devfile=devfile)
instance.image("test/50x50.png")
@with_setup(setup_testfile, teardown_testfile)
def test_function_image_with_255x255_png():
"""test the image function with 255x255.png (grayscale png)"""
instance = printer.File(devfile=devfile)
instance.image("test/255x255.png")
@with_setup(setup_testfile, teardown_testfile)
def test_function_image_with_400x400_png():
"""test the image function with 400x400.png (grayscale png)"""
instance = printer.File(devfile=devfile)
instance.image("test/400x400.png")