Skip to content

Commit

Permalink
Add a coverage environment and coveralls.io
Browse files Browse the repository at this point in the history
Also drop Python 3.3.
  • Loading branch information
jamadden committed Nov 13, 2017
1 parent 8fa53ab commit c9df399
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 8 deletions.
12 changes: 12 additions & 0 deletions .coveragerc
@@ -0,0 +1,12 @@
[run]
source = zope.testrunner
parallel = true

[report]
precision = 2
exclude_lines =
pragma: no cover
if __name__ == '__main__':
raise NotImplementedError
self.fail
raise AssertionError
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -9,3 +9,5 @@ develop-eggs/
tags
.tox
parts/
.coverage
htmlcov/
11 changes: 8 additions & 3 deletions .travis.yml
Expand Up @@ -2,15 +2,20 @@ sudo: false
language: python
python:
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6
- pypy
- pypy3
install:
- pip install tox-travis
- pip install -U pip setuptools
- pip install -U coverage coveralls
- pip install -U -e .[test]
script:
- tox
- coverage run setup.py -q test -q
after_success:
- coverage combine
- coveralls
notifications:
email: false
cache: pip
4 changes: 3 additions & 1 deletion CHANGES.rst
Expand Up @@ -4,7 +4,9 @@ zope.testrunner Changelog
4.8.2 (unreleased)
==================

- Nothing changed yet.
- Drop support for Python 3.3.

- Enable test coverage reporting on coveralls.io and in tox.ini.


4.8.1 (2017-11-12)
Expand Down
8 changes: 7 additions & 1 deletion MANIFEST.in
@@ -1,2 +1,8 @@
include *.rst *.py buildout.cfg tox.ini *.yml
include *.rst
include *.py
include buildout.cfg
include tox.ini
include *.yml
include .coveragerc

recursive-include src *.py *.txt *.test
4 changes: 4 additions & 0 deletions README.rst
Expand Up @@ -13,6 +13,10 @@ zope.testrunner
.. image:: https://travis-ci.org/zopefoundation/zope.testrunner.svg?branch=master
:target: https://travis-ci.org/zopefoundation/zope.testrunner

.. image:: https://coveralls.io/repos/github/zopefoundation/zope.testrunner/badge.svg?branch=master
:target: https://coveralls.io/github/zopefoundation/zope.testrunner?branch=master


.. contents::

This package provides a flexible test runner with layer support.
Expand Down
8 changes: 7 additions & 1 deletion setup.py
Expand Up @@ -43,6 +43,13 @@
import sys
sys.path = %r
try:
import coverage
except ImportError:
pass
else:
coverage.process_startup()
import os
os.chdir(%r)
Expand Down Expand Up @@ -158,7 +165,6 @@ def read(*names):
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
Expand Down
18 changes: 16 additions & 2 deletions tox.ini
@@ -1,9 +1,23 @@
[tox]
envlist =
py27,pypy,py33,py34,py35,py36,pypy3
py27,pypy,py34,py35,py36,pypy3,coverage

[testenv]
deps =
zope.testing
.[test]
commands =
python setup.py -q test -q

[testenv:coverage]
usedevelop = true
basepython =
python3.6
commands =
coverage run setup.py -q test -q
coverage combine
coverage report
setenv =
COVERAGE_PROCESS_START = {toxinidir}/.coveragerc
deps =
{[testenv]deps}
coverage

0 comments on commit c9df399

Please sign in to comment.