1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-12-02 09:43:30 +00:00

Clean up tests and migrate (#540)

* migrate
  * abstract base class test
  * remove assert_equal in test_cli
  * remove nose from test_cli
  * remove nose dependencies
  * use tempfile
* configure coverage
  * flag python version in name
  * enable comment
* drop EOL py37
This commit is contained in:
Patrick Kanzler
2023-08-10 00:18:02 +02:00
committed by GitHub
parent 31daabcbea
commit 4c2dcdfac6
12 changed files with 61 additions and 53 deletions

View File

@@ -1,4 +1,4 @@
from nose.tools import assert_raises
import pytest
from escpos.printer import Dummy
@@ -16,11 +16,11 @@ def test_line_spacing_rest():
def test_line_spacing_error_handling():
printer = Dummy()
with assert_raises(ValueError):
with pytest.raises(ValueError):
printer.line_spacing(99, divisor=44)
with assert_raises(ValueError):
with pytest.raises(ValueError):
printer.line_spacing(divisor=80, spacing=86)
with assert_raises(ValueError):
with pytest.raises(ValueError):
printer.line_spacing(divisor=360, spacing=256)
with assert_raises(ValueError):
with pytest.raises(ValueError):
printer.line_spacing(divisor=180, spacing=256)