From 6fe05f482e375849ad291718ae86be4025b70380 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Fri, 4 Aug 2017 08:18:27 -0500 Subject: Switch to zope.testrunner for namespace path issues. --- .coveragerc | 11 +++++++++++ .gitignore | 1 + .travis.yml | 11 ++++++++--- MANIFEST.in | 2 +- README.rst | 15 +++++++++++++-- setup.py | 10 +++++++--- tox.ini | 9 ++++----- 7 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..26ef06b --- /dev/null +++ b/.coveragerc @@ -0,0 +1,11 @@ +[run] +source = zope.browser + +[report] +precision = 2 +exclude_lines = + pragma: no cover + if __name__ == '__main__': + raise NotImplementedError + self.fail + raise AssertionError diff --git a/.gitignore b/.gitignore index 5ea1c28..3ac5f5b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,6 @@ parts .coverage coverage.xml nosetests.xml +htmlcov/ docs/_build/ diff --git a/.travis.yml b/.travis.yml index 2428b54..0bdca86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,10 +6,15 @@ python: - 3.4 - 3.5 - pypy - - pypy3 + - pypy3.5-5.8.0 install: - - pip install . + - pip install -U pip setuptools + - pip install -U coverage coveralls + - pip install -U -e .[test] script: - - python setup.py test -q + - coverage run -m zope.testrunner --test-path=src +after_success: + - coveralls notifications: email: false +cache: pip diff --git a/MANIFEST.in b/MANIFEST.in index 026ca84..ce36315 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,7 +4,7 @@ include tox.ini include bootstrap.py include buildout.cfg include .travis.yml - +include .coveragerc recursive-include src * recursive-include docs *.py diff --git a/README.rst b/README.rst index ac7a02c..0e4f2f6 100644 --- a/README.rst +++ b/README.rst @@ -2,11 +2,22 @@ zope.browser ============== +.. image:: https://img.shields.io/pypi/v/zope.browser.svg + :target: https://pypi.python.org/pypi/zope.browser/ + :alt: Latest release + +.. image:: https://img.shields.io/pypi/pyversions/zope.browser.svg + :target: https://pypi.org/project/zope.browser/ + :alt: Supported Python versions + .. image:: https://travis-ci.org/zopefoundation/zope.browser.png?branch=master :target: https://travis-ci.org/zopefoundation/zope.browser -.. image:: https://readthedocs.org/projects/zopesite/badge/?version=latest - :target: httpl://zopesite.readthedocs.io/en/latest/ +.. image:: https://coveralls.io/repos/github/zopefoundation/zope.browser/badge.svg?branch=master + :target: https://coveralls.io/github/zopefoundation/zope.browser?branch=master + +.. image:: https://readthedocs.org/projects/zopebrowser/badge/?version=latest + :target: https://zopebrowser.readthedocs.io/en/latest/ :alt: Documentation Status diff --git a/setup.py b/setup.py index 78a98fd..e685020 100644 --- a/setup.py +++ b/setup.py @@ -32,8 +32,8 @@ setup( read('CHANGES.rst') ), license='ZPL 2.1', - keywords = "zope browser component", - classifiers = [ + keywords="zope browser component", + classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Intended Audience :: Developers', @@ -50,7 +50,8 @@ setup( 'Natural Language :: English', 'Operating System :: OS Independent', 'Topic :: Internet :: WWW/HTTP', - 'Framework :: Zope3'], + 'Framework :: Zope3', + ], url='https://zopebrowser.readthedocs.io', packages=find_packages('src'), package_dir={'': 'src'}, @@ -65,6 +66,9 @@ setup( 'sphinx_rtd_theme', 'repoze.sphinx.autointerface', ], + 'test': [ + 'zope.testrunner', + ], }, test_suite='zope.browser.tests.test_suite', include_package_data=True, diff --git a/tox.ini b/tox.ini index 9209c5a..1bb8a32 100644 --- a/tox.ini +++ b/tox.ini @@ -4,21 +4,20 @@ envlist = [testenv] commands = - python setup.py -q test -q + zope-testrunner --test-path=src [] deps = - zope.interface + .[test] [testenv:coverage] usedevelop = true basepython = python2.7 commands = - nosetests --with-xunit --with-xcoverage + coverage run -m zope.testrunner --test-path=src + coverage report --fail-under=100 deps = {[testenv]deps} - nose coverage - nosexcover [testenv:docs] commands = -- cgit v1.2.1