Skip to content

Commit

Permalink
Drop support for python setup.py test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Oct 20, 2018
1 parent 6b7ccfe commit e4df964
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 24 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ matrix:
dist: xenial
sudo: true
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
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Changelog

- Add support for Python 3.7.

- Drop support for `python setup.py test`.


1.0 (2018-05-23)
----------------
Expand Down
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,6 @@ Run tests

Uncompress the archive, then run::

$ python setup.py test
$ virtualenv .
$ bin/pip install tox
$ tox
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@
extras_require={
'buildout': ['zc.buildout'],
},
tests_require=['zc.buildout'],
test_suite='z3c.checkversions.test.test_suite',
entry_points="""
[console_scripts]
checkversions = z3c.checkversions.main:main
Expand Down
8 changes: 1 addition & 7 deletions src/z3c/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
# this is a namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
except ImportError:
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
__import__('pkg_resources').declare_namespace(__name__) # pragma: nocover
6 changes: 3 additions & 3 deletions src/z3c/checkversions/buildout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ file:///.../testindex
We create a buildout with a [versions] section and a custom index:

>>> import os
>>> from z3c.checkversions.test import write_temp_file
>>> from z3c.checkversions.tests import write_temp_file
>>> buildout_path = write_temp_file("""
... [buildout]
... index = %s
Expand Down Expand Up @@ -57,7 +57,7 @@ zope.interface=3.6.2

The verbose mode gives the current and previous versions.
This is useful to find out which packages in your buildout can be updated by
using grep (``bin/checkversions -v | grep was``)
using grep (``bin/checkversions -v | grep was``)

>>> checker = buildout.Checker(filename=buildout_path, verbose=True)
>>> checker.check(level=2)
Expand Down Expand Up @@ -88,7 +88,7 @@ We can provide a blacklist file, containing versions to not suggest.
This file may come from a buildbot remembering failures.

>>> blacklist_path = write_temp_file("""
... zope.component =3.9.4
... zope.component =3.9.4
... zope.component = 3.9.3""")

>>> checker = buildout.Checker(filename=buildout_path,
Expand Down
File renamed without changes.
20 changes: 11 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ envlist =
py27,py34,py35,py36,py37,pypy,pypy3,coverage

[testenv]
use_develop = true
deps =
zc.buildout
usedevelop = true
commands =
python setup.py -q test
zope-testrunner --test-path=src []
extras = test,buildout
deps = zope.testrunner

[testenv:coverage]
basepython = python3.6
usedevelop = true
basepython =
python3.7
commands =
coverage run -m zope.testrunner --test-path=src []
coverage report --fail-under=77
deps =
{[testenv]deps}
zope.testrunner
coverage
commands =
coverage run --source=z3c.checkversions setup.py -q test
coverage report -m --fail-under=77

0 comments on commit e4df964

Please sign in to comment.