1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-08-24 09:03:34 +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

@@ -7,17 +7,16 @@
:license: MIT
"""
from nose.tools import raises
import pytest
import escpos.escpos as escpos
from abc import ABCMeta
@raises(TypeError)
def test_abstract_base_class_raises():
"""test whether the abstract base class raises an exception for ESC/POS"""
escpos.Escpos() # This call should raise TypeError because of abstractmethod _raw()
with pytest.raises(TypeError):
# This call should raise TypeError because of abstractmethod _raw()
escpos.Escpos()
def test_abstract_base_class():