Skip to content

Commit

Permalink
Add Python 3.6 suppport.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed May 26, 2017
1 parent 365d762 commit 2966381
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 42 deletions.
12 changes: 12 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[run]
branch = True
source = zope.browsermenu

[report]
precision = 2

[paths]
source =
src/
.tox/py*/lib/python*/site-packages/
.tox/pypy*/site-packages/
14 changes: 9 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
*.pyc
.coverage
.coverage.*
.installed.cfg
__pycache__
coverage.xml
src/*.egg-info

.installed.cfg
.tox
bin
develop-eggs
parts
.tox/
bin/
develop-eggs/
htmlcov/
parts/
17 changes: 12 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ python:
- 3.3
- 3.4
- 3.5
- pypy
- pypy3
- 3.6
- pypy-5.4.1
install:
- pip install tox-travis
- pip install -U pip setuptools zope.testrunner
- pip install -U coveralls coverage
- pip install -U -e ".[test]"
script:
- tox
- coverage run -m zope.testrunner --test-path=src --auto-color
after_success:
- coveralls
notifications:
email: false
email: false
cache: pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Changes
4.2.0 (unreleased)
==================

- Add support for Python 3.5.
- Add support for Python 3.5 and 3.6.

- Drop support for Python 2.6 and 3.2.

Expand Down
17 changes: 1 addition & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,6 @@ def read(*rnames):
long_description = (read('README.rst') + '\n\n' + read('CHANGES.rst'))


def alltests():
import os
import sys
import unittest
# use the zope.testrunner machinery to find all the
# test suites we've put under ourselves
import zope.testrunner.find
import zope.testrunner.options
here = os.path.abspath(os.path.join(os.path.dirname(__file__), 'src'))
args = sys.argv[:]
defaults = ["--test-path", here]
options = zope.testrunner.options.get_options(args, defaults)
suites = list(zope.testrunner.find.find_suites(options))
return unittest.TestSuite(suites)

setup(
name='zope.browsermenu',
version='4.2.0.dev0',
Expand All @@ -56,6 +41,7 @@ def alltests():
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Operating System :: OS Independent',
Expand Down Expand Up @@ -86,7 +72,6 @@ def alltests():
'test': ['zope.testing'],
},
tests_require=['zope.testing', 'zope.testrunner'],
test_suite='__main__.alltests',
include_package_data=True,
zip_safe=False,
)
41 changes: 26 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
[tox]
envlist =
py27,pypy,py33,py34,py35,pypy3
py27,
py33,
py34,
py35,
py36,
pypy,
pypy3,
coverage-report,

[testenv]
commands =
python setup.py -q test -q
# without explicit deps, setup.py test will download a bunch of eggs into $PWD
# (and it seems I can't use zope.dottedname[testing] here, so forget DRY)
coverage run -m zope.testrunner --test-path=src {posargs:-vc}
deps =
zope.browser
zope.component
zope.configuration
zope.i18nmessageid
zope.interface
zope.pagetemplate
zope.publisher
zope.schema
zope.security
zope.traversing
zope.testing
.[test]
zope.testrunner
coverage
setenv =
COVERAGE_FILE=.coverage.{envname}

[testenv:coverage-report]
basepython = python2.7
deps = coverage
setenv =
COVERAGE_FILE=.coverage
skip_install = true
commands =
coverage erase
coverage combine
coverage html
coverage xml
coverage report --show-missing

0 comments on commit 2966381

Please sign in to comment.