migrate abstract base class test
This commit is contained in:
parent
31daabcbea
commit
109b7cb723
@ -7,17 +7,16 @@
|
|||||||
:license: MIT
|
:license: MIT
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import pytest
|
||||||
from nose.tools import raises
|
|
||||||
|
|
||||||
import escpos.escpos as escpos
|
import escpos.escpos as escpos
|
||||||
from abc import ABCMeta
|
from abc import ABCMeta
|
||||||
|
|
||||||
|
|
||||||
@raises(TypeError)
|
|
||||||
def test_abstract_base_class_raises():
|
def test_abstract_base_class_raises():
|
||||||
"""test whether the abstract base class raises an exception for ESC/POS"""
|
"""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():
|
def test_abstract_base_class():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user