From 809b4f47aaf19c872421de7a12647e762b32b8d9 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sun, 8 Nov 2020 19:45:08 +0100 Subject: [PATCH 1/5] update capabilities-data --- capabilities-data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capabilities-data b/capabilities-data index 3b5b35c..3612db4 160000 --- a/capabilities-data +++ b/capabilities-data @@ -1 +1 @@ -Subproject commit 3b5b35cfd35d297f9085ec16d47d1f77c3f1e768 +Subproject commit 3612db407d02a08acd93a1540f2b4823be3f020e From e898413464934bf4059553b883f846b54c96bb43 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sun, 8 Nov 2020 21:29:18 +0100 Subject: [PATCH 2/5] change useage of assert_equal(s) --- test/test_cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_cli.py b/test/test_cli.py index 1f41095..eba5b76 100644 --- a/test/test_cli.py +++ b/test/test_cli.py @@ -6,7 +6,7 @@ import os import sys from scripttest import TestFileEnvironment -from nose.tools import assert_equals, nottest +from nose.tools import assert_equal, nottest import escpos TEST_DIR = os.path.abspath('test/test-cli-output') @@ -78,7 +78,7 @@ class TestCLI: """ Test the version string """ result = self.env.run('python-escpos', 'version') 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 def test_cli_text(self): @@ -109,6 +109,6 @@ class TestCLI: expect_error=True, expect_stderr=True ) - assert_equals(result.returncode, 2) + assert_equal(result.returncode, 2) assert 'error:' in result.stderr assert not result.files_updated From b608d599420e8371fb2898b342adc6bc7d261ab3 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sun, 8 Nov 2020 21:34:07 +0100 Subject: [PATCH 3/5] remove viivakoodi from dependencies --- setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 8052855..82bb443 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,7 +47,6 @@ install_requires = argparse argcomplete future - viivakoodi>=0.8 setup_requires = setuptools_scm tests_require = jaconv From 3962bc991f5073e2a73ba06692d490be0621c1f7 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Sun, 8 Nov 2020 22:04:27 +0100 Subject: [PATCH 4/5] improve test for soft barcode --- test/test_function_softbarcode.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/test_function_softbarcode.py b/test/test_function_softbarcode.py index fc702d7..78ae5bc 100644 --- a/test/test_function_softbarcode.py +++ b/test/test_function_softbarcode.py @@ -1,6 +1,7 @@ #!/usr/bin/python import escpos.printer as printer +import barcode.errors import pytest @@ -8,10 +9,15 @@ import pytest def instance(): 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): - instance.soft_barcode("ean8", "1234") + """test with a valid ean8 barcode""" + instance.soft_barcode("ean8", "1234567") def test_soft_barcode_ean8_nocenter(instance): - instance.soft_barcode("ean8", "1234", center=False) + instance.soft_barcode("ean8", "1234567", center=False) From 0057a498bbb877e2cd14261ffeb23e53438652e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 8 Nov 2020 21:08:33 +0000 Subject: [PATCH 5/5] Bump actions/setup-python from v2.1.3 to v2.1.4 Bumps [actions/setup-python](https://github.com/actions/setup-python) from v2.1.3 to v2.1.4. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v2.1.3...41b7212b1668f5de9d65e9c82aa777e6bbedb3a8) Signed-off-by: dependabot[bot] --- .github/workflows/pythonpackage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index a9e6944..78de3a5 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -22,7 +22,7 @@ jobs: with: submodules: 'recursive' - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2.1.3 + uses: actions/setup-python@v2.1.4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies