REFACTOR add PEP8-newlines
This commit is contained in:
parent
7547bfddd2
commit
0121aa0bfb
|
@ -28,6 +28,7 @@ printer:
|
||||||
testfile=DEVFILE,
|
testfile=DEVFILE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class TestCLI:
|
class TestCLI:
|
||||||
""" Contains setups, teardowns, and tests for CLI
|
""" Contains setups, teardowns, and tests for CLI
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -21,6 +21,7 @@ import filecmp
|
||||||
|
|
||||||
devfile = 'testfile'
|
devfile = 'testfile'
|
||||||
|
|
||||||
|
|
||||||
def setup_testfile():
|
def setup_testfile():
|
||||||
"""create a testfile as devfile"""
|
"""create a testfile as devfile"""
|
||||||
fhandle = open(devfile, 'a')
|
fhandle = open(devfile, 'a')
|
||||||
|
@ -29,10 +30,12 @@ def setup_testfile():
|
||||||
finally:
|
finally:
|
||||||
fhandle.close()
|
fhandle.close()
|
||||||
|
|
||||||
|
|
||||||
def teardown_testfile():
|
def teardown_testfile():
|
||||||
"""destroy testfile again"""
|
"""destroy testfile again"""
|
||||||
os.remove(devfile)
|
os.remove(devfile)
|
||||||
|
|
||||||
|
|
||||||
@with_setup(setup_testfile, teardown_testfile)
|
@with_setup(setup_testfile, teardown_testfile)
|
||||||
def test_function_text_dies_ist_ein_test_lf():
|
def test_function_text_dies_ist_ein_test_lf():
|
||||||
"""test the text printing function with simple string and compare output"""
|
"""test the text printing function with simple string and compare output"""
|
||||||
|
|
|
@ -19,6 +19,7 @@ import os
|
||||||
|
|
||||||
devfile = 'testfile'
|
devfile = 'testfile'
|
||||||
|
|
||||||
|
|
||||||
def setup_testfile():
|
def setup_testfile():
|
||||||
"""create a testfile as devfile"""
|
"""create a testfile as devfile"""
|
||||||
fhandle = open(devfile, 'a')
|
fhandle = open(devfile, 'a')
|
||||||
|
@ -27,10 +28,12 @@ def setup_testfile():
|
||||||
finally:
|
finally:
|
||||||
fhandle.close()
|
fhandle.close()
|
||||||
|
|
||||||
|
|
||||||
def teardown_testfile():
|
def teardown_testfile():
|
||||||
"""destroy testfile again"""
|
"""destroy testfile again"""
|
||||||
os.remove(devfile)
|
os.remove(devfile)
|
||||||
|
|
||||||
|
|
||||||
@with_setup(setup_testfile, teardown_testfile)
|
@with_setup(setup_testfile, teardown_testfile)
|
||||||
def test_instantiation():
|
def test_instantiation():
|
||||||
"""test the instantiation of a escpos-printer class and basic printing"""
|
"""test the instantiation of a escpos-printer class and basic printing"""
|
||||||
|
|
Loading…
Reference in New Issue