
Python 2.7 EOL is arriving on 2020-01-01: https://pythonclock.org/ This will allow us to use Python 3 only libraries, like python-barcode, which can maintain a reduced, simpler codebase, due to only one version to support. Closes #371. Signed-off-by: Romain Porte <microjoe@microjoe.org>
16 lines
373 B
Python
16 lines
373 B
Python
#!/usr/bin/python
|
|
|
|
import escpos.printer as printer
|
|
from escpos.exceptions import CashDrawerError
|
|
import pytest
|
|
|
|
|
|
def test_raise_CashDrawerError():
|
|
"""should raise an error if the sequence is invalid.
|
|
"""
|
|
instance = printer.Dummy()
|
|
with pytest.raises(CashDrawerError):
|
|
# call with sequence that is too long
|
|
instance.cashdraw([1,1,1,1,1,1])
|
|
|