diff options
author | Michael Howitz <mh@gocept.com> | 2021-05-28 08:06:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 08:06:54 +0200 |
commit | 285490922584c1be42b5be89c00e7c8e1d972fb8 (patch) | |
tree | 1799c5e38f037525a99d6784e6b54f9ae0e6d0b8 /tox.ini | |
parent | 7153aa0fbb108e9c74d13a2454e1602330bf9b4e (diff) | |
download | zope-pagetemplate-285490922584c1be42b5be89c00e7c8e1d972fb8.tar.gz |
Config with pure python (#28)
* Lint the code.
* Add support for Python 3.9.
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 90 |
1 files changed, 72 insertions, 18 deletions
@@ -1,33 +1,87 @@ +# Generated from: +# https://github.com/zopefoundation/meta/tree/master/config/pure-python [tox] +minversion = 3.18 envlist = - py27,py35,py36,py37,py38,pypy,pypy3,coverage,docs + lint + py27 + py35 + py36 + py37 + py38 + py39 + pypy + pypy3 + docs + coverage [testenv] +usedevelop = true +deps = + zope.testrunner + # Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it: + Sphinx < 4 commands = - zope-testrunner --test-path=src [] - sphinx-build -b doctest -d {envdir}/doctrees docs {envdir}/doctest -deps= - py27,pypy: Sphinx < 2 - py27,pypy: sphinxcontrib-websupport < 1.2 + zope-testrunner --test-path=src {posargs:-vc} + sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest extras = test docs -[testenv:coverage] -usedevelop = true -basepython = - python3.7 -commands = - coverage run -m zope.testrunner --test-path=src [] - coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest - coverage html - coverage report --fail-under=100 +[testenv:lint] +basepython = python3 +skip_install = true deps = - coverage + flake8 + check-manifest + check-python-versions +commands = + flake8 src setup.py + check-manifest + check-python-versions [testenv:docs] -basepython = - python3.7 +basepython = python3 +skip_install = false +# Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it: +deps = Sphinx < 4 +commands_pre = 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 + +[testenv:coverage] +basepython = python3 +allowlist_externals = + mkdir +deps = + coverage + coverage-python-version + # Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it: + Sphinx < 4 + zope.testrunner +commands = + mkdir -p {toxinidir}/parts/htmlcov + coverage run -m zope.testrunner --test-path=src {posargs:-vc} + coverage run -a -m sphinx -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest + coverage html + coverage report -m --fail-under=97 + +[coverage:run] +branch = True +plugins = coverage_python_version +source = src + +[coverage:report] +precision = 2 +exclude_lines = + pragma: no cover + pragma: nocover + except ImportError: + raise NotImplementedError + if __name__ == '__main__': + self.fail + raise AssertionError + +[coverage:html] +directory = parts/htmlcov |