mirror of
https://github.com/python-escpos/python-escpos
synced 2025-08-24 09:03:34 +00:00
Improve test coverage and fix issue in path loading (#602)
* reactivate skipped tests * remove unused internal interfaces * enable pytest in VS Code * simplify and fix path logic in loader * increase test coverage * test missing config * check for wrong printer names * Skipped appdir test
This commit is contained in:
@@ -89,9 +89,6 @@ class TestCLI:
|
||||
# test that additional information on e.g. Serial is printed
|
||||
assert "Serial" in result.stdout
|
||||
|
||||
@pytest.mark.skip(
|
||||
reason="disable this test as it is not that easy anymore to predict the outcome of this call"
|
||||
)
|
||||
def test_cli_text(self):
|
||||
"""Make sure text returns what we sent it"""
|
||||
test_text = "this is some text"
|
||||
@@ -107,7 +104,9 @@ class TestCLI:
|
||||
)
|
||||
assert not result.stderr
|
||||
assert DEVFILE_NAME in result.files_updated.keys()
|
||||
assert result.files_updated[DEVFILE_NAME].bytes == test_text + "\n"
|
||||
assert (
|
||||
result.files_updated[DEVFILE_NAME].bytes == "\x1bt\x00" + test_text + "\n"
|
||||
)
|
||||
|
||||
def test_cli_text_invalid_args(self):
|
||||
"""Test a failure to send valid arguments"""
|
||||
|
Reference in New Issue
Block a user