tox: Run everything but unit tests under Python 3

The demise of Python 2.7 is not far off and we intend to drop support
for it in Sphinx 2.0. As a result, there probably isn't a better time
than now to start testing with Python 3 by default. There are a couple
of advantages to this:

- flake8 is stricter under Python 3 and we don't need to ignore files
  with Python 3 syntax
- We get to dogfood Sphinx against its own documentation using Python 3
- pylint gains support for Python 3 syntax

Signed-off-by: Stephen Finucane <stephen@that.guru>
This commit is contained in:
Stephen Finucane
2018-06-20 09:53:29 +01:00
parent c0f42b6519
commit 93589a3572

View File

@@ -27,12 +27,14 @@ commands=
pytest -Wall --durations 25 {posargs}
[testenv:flake8]
basepython = python3
description =
Run style checks.
commands =
flake8
[testenv:pylint]
basepython = python3
description =
Run source code analyzer.
deps =
@@ -42,6 +44,7 @@ commands =
pylint --rcfile utils/pylintrc sphinx
[testenv:coverage]
basepython = python3
description =
Run code coverage checks.
setenv =
@@ -51,6 +54,7 @@ commands =
coverage report
[testenv:mypy]
basepython = python3
description =
Run type checks.
deps =
@@ -59,6 +63,7 @@ commands=
mypy sphinx/
[testenv:docs]
basepython = python3
description =
Build documentation.
commands =