diff options
author | Maurits van Rees <maurits@vanrees.org> | 2021-09-02 12:15:21 +0200 |
---|---|---|
committer | Maurits van Rees <maurits@vanrees.org> | 2021-09-02 13:02:41 +0200 |
commit | 914fe2bf8a5b1a5f9740d66293b82af7112701a4 (patch) | |
tree | a1e81730cb0da3b25ad2a27c561df7a3e14443c2 | |
parent | 11ea14a370ea71c8d35bcebe48ce6559a9f65845 (diff) | |
download | zope-i18n-914fe2bf8a5b1a5f9740d66293b82af7112701a4.tar.gz |
Include sphinx doctests.
-rw-r--r-- | .meta.toml | 2 | ||||
-rw-r--r-- | setup.cfg | 1 | ||||
-rw-r--r-- | tox.ini | 10 |
3 files changed, 10 insertions, 3 deletions
@@ -10,7 +10,7 @@ with-pypy = true with-future-python = false with-legacy-python = true with-docs = true -with-sphinx-doctests = false +with-sphinx-doctests = true [tox] use-flake8 = true @@ -11,6 +11,7 @@ ignore = .editorconfig .meta.toml docs/_build/html/_sources/* + docs/_build/doctest/* ignore-bad-ideas = src/zope/i18n/tests/de-default.mo src/zope/i18n/tests/en-alt.mo @@ -18,10 +18,14 @@ envlist = [testenv] usedevelop = true deps = + # Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it: + Sphinx < 4 commands = zope-testrunner --test-path=src {posargs:-vc} + !py27-!pypy: sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest extras = test + docs [testenv:lint] basepython = python3 @@ -41,11 +45,10 @@ basepython = python3 skip_install = false # Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it: deps = Sphinx < 4 -extras = - docs 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 @@ -54,9 +57,12 @@ allowlist_externals = deps = coverage coverage-python-version + # Until repoze.sphinx.autointerface supports Sphinx 4.x we cannot use it: + Sphinx < 4 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=100 |