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

reformat PEP8 and similar issues

This commit is contained in:
Patrick Kanzler
2017-01-30 00:10:14 +01:00
parent 2ea8e69c66
commit c2fc464c55
12 changed files with 35 additions and 36 deletions

View File

@@ -30,7 +30,7 @@ printer:
)
class TestCLI():
class TestCLI:
""" Contains setups, teardowns, and tests for CLI
"""

View File

@@ -35,4 +35,4 @@ def test_lacks_support(bctype, supports_b):
with pytest.raises(BarcodeTypeError):
instance.barcode('test', bctype)
assert instance.output == b''
assert instance.output == b''

View File

@@ -17,10 +17,10 @@ def test_line_spacing_rest():
def test_line_spacing_error_handling():
printer = Dummy()
with assert_raises(ValueError):
printer.line_spacing(99, divisor=44)
printer.line_spacing(99, divisor=44)
with assert_raises(ValueError):
printer.line_spacing(divisor=80, spacing=86)
printer.line_spacing(divisor=80, spacing=86)
with assert_raises(ValueError):
printer.line_spacing(divisor=360, spacing=256)
printer.line_spacing(divisor=360, spacing=256)
with assert_raises(ValueError):
printer.line_spacing(divisor=180, spacing=256)
printer.line_spacing(divisor=180, spacing=256)

View File

@@ -22,7 +22,6 @@ from escpos.katakana import encode_katakana
from escpos.exceptions import CharCodeError, Error
class TestEncoder:
"""
Tests the single encoders.

View File

@@ -26,6 +26,7 @@ if six.PY3:
else:
mock_open_call = '__builtin__.open'
@given(path=text())
def test_load_file_printer(mocker, path):
"""test the loading of the file-printer"""

View File

@@ -35,4 +35,4 @@ class TestCustomProfile:
assert Profile(columns=10).get_columns('sdfasdf') == 10
def test_features(self):
assert Profile(features={'foo': True}).supports('foo')
assert Profile(features={'foo': True}).supports('foo')