Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Run doctests on all versions of Python in tox and travis - Enable coveralls and reach 100% coverage. - Fix broken badge. - Whitespace cleanup in setup.py
- Loading branch information
Showing
12 changed files
with
111 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[run] | ||
source = zope.hookable | ||
|
||
[report] | ||
exclude_lines = | ||
pragma: no cover | ||
if __name__ == '__main__': | ||
raise NotImplementedError | ||
self.fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ parts | |
.coverage | ||
coverage.xml | ||
nosetests.xml | ||
htmlcov/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,32 @@ | ||
``zope.hookable`` | ||
================= | ||
=================== | ||
``zope.hookable`` | ||
=================== | ||
|
||
.. image:: https://img.shields.io/pypi/v/zope.hookable.svg | ||
:target: https://pypi.python.org/pypi/zope.hookable/ | ||
:alt: Latest Version | ||
:target: https://pypi.python.org/pypi/zope.hookable/ | ||
:alt: Latest release | ||
|
||
.. image:: https://img.shields.io/pypi/pyversions/zope.hookable.svg | ||
:target: https://pypi.org/project/zope.hookable/ | ||
:alt: Supported Python versions | ||
|
||
.. image:: https://travis-ci.org/zopefoundation/zope.hookable.png?branch=master | ||
:target: https://travis-ci.org/zopefoundation/zope.hookable | ||
|
||
.. image:: https://readthedocs.org/projects/zopehookable/badge/?version=latest | ||
:target: http://zopehookable.readthedocs.org/en/latest/ | ||
:target: http://zopehookable.readthedocs.io/en/latest/ | ||
:alt: Documentation Status | ||
|
||
.. image:: https://coveralls.io/repos/github/zopefoundation/zope.hookable/badge.svg?branch=master | ||
:target: https://coveralls.io/github/zopefoundation/zope.hookable?branch=master | ||
|
||
|
||
This package supports the efficient creation of "hookable" objects, which | ||
are callable objects that are meant to be optionally replaced. | ||
|
||
The idea is you create a function that does some default thing and make it | ||
The idea is that you create a function that does some default thing and make it | ||
hookable. Later, someone can modify what it does by calling its sethook method | ||
and changing its implementation. All users of the function, including those | ||
that imported it, will see the change. | ||
|
||
Documentation is hosted at http://zopehookable.readthedocs.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__import__('pkg_resources').declare_namespace(__name__) | ||
__import__('pkg_resources').declare_namespace(__name__) # pragma: no cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,30 @@ | ||
[tox] | ||
envlist = | ||
py27,py33,py34,py35,pypy,pypy3,coverage,docs | ||
envlist = | ||
py27,py34,py35,py36,pypy,pypy3,coverage,docs | ||
|
||
[testenv] | ||
commands = | ||
commands = | ||
python setup.py -q test -q | ||
sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest | ||
deps = | ||
.[test,docs] | ||
|
||
[testenv:coverage] | ||
usedevelop = true | ||
basepython = | ||
python2.7 | ||
commands = | ||
nosetests --with-xunit --with-xcoverage | ||
commands = | ||
coverage run setup.py -q test -q | ||
coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest | ||
coverage report | ||
deps = | ||
nose | ||
{[testenv]deps} | ||
coverage | ||
nosexcover | ||
|
||
|
||
[testenv:docs] | ||
basepython = | ||
python2.7 | ||
commands = | ||
commands = | ||
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html | ||
sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest | ||
deps = | ||
Sphinx |