Merge pull request #430 from python-escpos/clean-up-broken-dependencies
Clean up broken dependencies
This commit is contained in:
commit
b3e93020d4
|
@ -47,7 +47,6 @@ install_requires =
|
||||||
argparse
|
argparse
|
||||||
argcomplete
|
argcomplete
|
||||||
future
|
future
|
||||||
viivakoodi>=0.8
|
|
||||||
setup_requires = setuptools_scm
|
setup_requires = setuptools_scm
|
||||||
tests_require =
|
tests_require =
|
||||||
jaconv
|
jaconv
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from scripttest import TestFileEnvironment
|
from scripttest import TestFileEnvironment
|
||||||
from nose.tools import assert_equals, nottest
|
from nose.tools import assert_equal, nottest
|
||||||
import escpos
|
import escpos
|
||||||
|
|
||||||
TEST_DIR = os.path.abspath('test/test-cli-output')
|
TEST_DIR = os.path.abspath('test/test-cli-output')
|
||||||
|
@ -78,7 +78,7 @@ class TestCLI:
|
||||||
""" Test the version string """
|
""" Test the version string """
|
||||||
result = self.env.run('python-escpos', 'version')
|
result = self.env.run('python-escpos', 'version')
|
||||||
assert not result.stderr
|
assert not result.stderr
|
||||||
assert_equals(escpos.__version__, result.stdout.strip())
|
assert_equal(escpos.__version__, result.stdout.strip())
|
||||||
|
|
||||||
@nottest # disable this test as it is not that easy anymore to predict the outcome of this call
|
@nottest # disable this test as it is not that easy anymore to predict the outcome of this call
|
||||||
def test_cli_text(self):
|
def test_cli_text(self):
|
||||||
|
@ -109,6 +109,6 @@ class TestCLI:
|
||||||
expect_error=True,
|
expect_error=True,
|
||||||
expect_stderr=True
|
expect_stderr=True
|
||||||
)
|
)
|
||||||
assert_equals(result.returncode, 2)
|
assert_equal(result.returncode, 2)
|
||||||
assert 'error:' in result.stderr
|
assert 'error:' in result.stderr
|
||||||
assert not result.files_updated
|
assert not result.files_updated
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
import escpos.printer as printer
|
import escpos.printer as printer
|
||||||
|
import barcode.errors
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,10 +9,15 @@ import pytest
|
||||||
def instance():
|
def instance():
|
||||||
return printer.Dummy()
|
return printer.Dummy()
|
||||||
|
|
||||||
|
def test_soft_barcode_ean8_invalid(instance):
|
||||||
|
"""test with an invalid barcode"""
|
||||||
|
with pytest.raises(barcode.errors.BarcodeError):
|
||||||
|
instance.soft_barcode("ean8", "1234")
|
||||||
|
|
||||||
def test_soft_barcode_ean8(instance):
|
def test_soft_barcode_ean8(instance):
|
||||||
instance.soft_barcode("ean8", "1234")
|
"""test with a valid ean8 barcode"""
|
||||||
|
instance.soft_barcode("ean8", "1234567")
|
||||||
|
|
||||||
|
|
||||||
def test_soft_barcode_ean8_nocenter(instance):
|
def test_soft_barcode_ean8_nocenter(instance):
|
||||||
instance.soft_barcode("ean8", "1234", center=False)
|
instance.soft_barcode("ean8", "1234567", center=False)
|
||||||
|
|
Loading…
Reference in New Issue