diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..1c76966 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,11 @@ +[run] +source = zope.formlib + +[report] +precision = 2 +exclude_lines = + pragma: no cover + if __name__ == '__main__': + raise NotImplementedError + self.fail + raise AssertionError diff --git a/.gitignore b/.gitignore index 264cc13..96407f9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ build/ develop-eggs/ eggs/ parts/ +coverage/ diff --git a/.travis.yml b/.travis.yml index 6bad045..0bdca86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,20 @@ language: python sudo: false python: - - 2.7 - - 3.3 - - 3.4 - - 3.5 - - pypy -# - pypy3 -# pending 3.3-compatible release + - 2.7 + - 3.3 + - 3.4 + - 3.5 + - pypy + - pypy3.5-5.8.0 install: - - pip install tox-travis + - pip install -U pip setuptools + - pip install -U coverage coveralls + - pip install -U -e .[test] script: - - tox + - 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 e9ec60d..45019b2 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,6 +3,8 @@ include *.txt include *.py include buildout.cfg include tox.ini +include .travis.yml +include .coveragerc recursive-include src * diff --git a/setup.py b/setup.py index f49b589..ba21292 100644 --- a/setup.py +++ b/setup.py @@ -83,6 +83,7 @@ def alltests(): extras_require=dict( test=['zope.configuration', 'zope.testing', + 'zope.testrunner', ] ), install_requires=[ diff --git a/tox.ini b/tox.ini index 33dd1e5..8ca99ee 100644 --- a/tox.ini +++ b/tox.ini @@ -6,22 +6,6 @@ envlist = [testenv] commands = - python setup.py -q test -q + zope-testrunner --test-path=src deps = - pytz - zope.browser - zope.browserpage - zope.component - zope.event - zope.i18n - zope.i18nmessageid - zope.interface - zope.lifecycleevent - zope.publisher - zope.schema - zope.security - zope.traversing - zope.datetime - zope.configuration - zope.testing - zope.testrunner + .[test]