From aa750549a079358c5e489b91238e9db54121eb7b Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Wed, 10 Jul 2019 15:12:01 +0300 Subject: Drop Python 3.4 support --- .travis.yml | 9 ++------- CHANGES.rst | 4 ++-- setup.py | 3 +-- tox.ini | 14 ++++++++------ 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index b2ff47d..7dccb10 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,12 @@ language: python -sudo: false +dist: xenial python: - 2.7 - - 3.4 - 3.5 - 3.6 + - 3.7 - pypy - pypy3 -matrix: - include: - - python: "3.7" - dist: xenial - sudo: true install: - pip install -U pip setuptools - pip install -U coverage coveralls diff --git a/CHANGES.rst b/CHANGES.rst index 2176760..5b38083 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,10 +2,10 @@ CHANGES ========= -4.6.3 (unreleased) +4.7.0 (unreleased) ================== -- Nothing changed yet. +- Drop Python 3.4 support. 4.6.2 (2019-02-19) diff --git a/setup.py b/setup.py index 3459e45..7116442 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,7 @@ TESTS_REQUIRE = COMPILE_REQUIRES + ZCML_REQUIRES + [ setup( name='zope.i18n', - version='4.6.3.dev0', + version='4.7.0.dev0', author='Zope Foundation and Contributors', author_email='zope-dev@zope.org', description='Zope Internationalization Support', @@ -80,7 +80,6 @@ setup( 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', diff --git a/tox.ini b/tox.ini index d4a3cf9..c03bb9c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,25 +1,27 @@ [tox] envlist = - py27,py34,py35,py36,py37,pypy,pypy3,coverage,docs + py27,py35,py36,py37,pypy,pypy3,coverage,docs [testenv] commands = - zope-testrunner --test-path=src [] + zope-testrunner --test-path=src {posargs:-pvc} sphinx-build -b doctest -d {envdir}/doctrees docs {envdir}/doctest -deps = - .[test,docs,compile] +extras = + test + docs + compile [testenv:coverage] usedevelop = true basepython = python3.6 commands = - coverage run -m zope.testrunner --test-path=src [] + coverage run -m zope.testrunner --test-path=src {posargs:-pvc} coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest coverage report --fail-under=100 deps = - {[testenv]deps} coverage +parallel_show_output = true [testenv:docs] basepython = -- cgit v1.2.1 From 5e6abf2f9811f1ce2d208c447f084a6bebadb32e Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Wed, 10 Jul 2019 15:19:42 +0300 Subject: Make 'tox -e coverage' report paths in src/ --- .coveragerc | 6 ++++++ tox.ini | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.coveragerc b/.coveragerc index b5cbda3..b5ae109 100644 --- a/.coveragerc +++ b/.coveragerc @@ -3,6 +3,12 @@ source = zope.i18n omit = */flycheck_*py +[paths] +source = + src/ + .tox/*/lib/python*/site-packages/ + .tox/pypy*/site-packages/ + [report] precision = 2 exclude_lines = diff --git a/tox.ini b/tox.ini index c03bb9c..757b7d4 100644 --- a/tox.ini +++ b/tox.ini @@ -16,8 +16,10 @@ usedevelop = true basepython = python3.6 commands = - coverage run -m zope.testrunner --test-path=src {posargs:-pvc} - coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest + coverage erase + coverage run -p -m zope.testrunner --test-path=src {posargs:-pvc} + coverage run -p -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest + coverage combine coverage report --fail-under=100 deps = coverage -- cgit v1.2.1 From 2735e1e170e5f8c66275229573669b632c0a8b61 Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Wed, 10 Jul 2019 15:25:53 +0300 Subject: Back to 100% test coverage to make coveralls happy --- src/zope/i18n/tests/test_formats.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/zope/i18n/tests/test_formats.py b/src/zope/i18n/tests/test_formats.py index 879a71a..83c9129 100644 --- a/src/zope/i18n/tests/test_formats.py +++ b/src/zope/i18n/tests/test_formats.py @@ -1039,6 +1039,7 @@ class TestNumberPatternParser(_TestCase): (None, '', None, '0', '', '', None, '1', None, ()), neg_pattern) + class TestNumberFormat(_TestCase): """Test the functionality of an implmentation of the NumberFormat.""" @@ -1326,6 +1327,10 @@ class TestNumberFormat(_TestCase): self.format.format(-987654321, '+#,##,#0,000;-#,##,#0,000'), '-98,76,54,321') + def testFormatBadThousandSeparator(self): + self.assertRaises(ValueError, + self.format.format, 23341, '0,') + def testFormatDecimal(self): self.assertEqual(self.format.format(23341.02357, '###0.0#'), '23341.02') -- cgit v1.2.1