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

@@ -10,7 +10,6 @@
import pytest
from nose.tools import raises, assert_raises
from hypothesis import given, example
import hypothesis.strategies as st
from escpos.magicencode import MagicEncode, Encoder
@@ -32,9 +31,9 @@ class TestEncoder:
assert not Encoder({"CP437": 1}).find_suitable_encoding("")
assert Encoder({"CP858": 1}).find_suitable_encoding("") == "CP858"
@raises(ValueError)
def test_get_encoding(self):
Encoder({}).get_encoding_name("latin1")
with pytest.raises(ValueError):
Encoder({}).get_encoding_name("latin1")
class TestMagicEncode: