Merge pull request #4120 from stephenfin/the-great-toxification-4

The great toxification (part 4)
This commit is contained in:
Takeshi KOMIYA 2017-10-18 01:48:45 +09:00 committed by GitHub
commit cfa2eff733
7 changed files with 23 additions and 56 deletions

View File

@ -18,8 +18,8 @@ environment:
install: install:
- C:\Python%PYTHON%\python.exe -m pip install -U pip setuptools - C:\Python%PYTHON%\python.exe -m pip install -U pip setuptools
- C:\Python%PYTHON%\python.exe -m pip install docutils==%DOCUTILS% - C:\Python%PYTHON%\python.exe -m pip install docutils==%DOCUTILS% mock
- C:\Python%PYTHON%\python.exe -m pip install -r test-reqs.txt - C:\Python%PYTHON%\python.exe -m pip install .[test,websupport]
# No automatic build, just run python tests # No automatic build, just run python tests
build: off build: off

View File

@ -40,7 +40,8 @@ addons:
install: install:
- pip install -U pip setuptools - pip install -U pip setuptools
- pip install docutils==$DOCUTILS - pip install docutils==$DOCUTILS
- pip install -r test-reqs.txt - pip install .[test,websupport]
- pip install flake8
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then python3.6 -m pip install mypy typed-ast; fi - if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then python3.6 -m pip install mypy typed-ast; fi
script: script:
- flake8 - flake8

View File

@ -116,7 +116,7 @@ These are the basic steps needed to start developing on Sphinx.
* Run the unit tests:: * Run the unit tests::
pip install -r test-reqs.txt pip install .[test,websupport]
make test make test
* Again, it's useful to turn on deprecation warnings on so they're shown in * Again, it's useful to turn on deprecation warnings on so they're shown in

View File

@ -12,7 +12,6 @@ include sphinx-autogen.py
include sphinx-build.py include sphinx-build.py
include sphinx-quickstart.py include sphinx-quickstart.py
include sphinx-apidoc.py include sphinx-apidoc.py
include test-reqs.txt
include tox.ini include tox.ini
include sphinx/locale/.tx/config include sphinx/locale/.tx/config

View File

@ -69,19 +69,19 @@ extras_require = {
], ],
'test': [ 'test': [
'pytest', 'pytest',
'mock', # it would be better for 'test:python_version in 2.7' 'pytest-cov',
'simplejson', # better: 'test:platform_python_implementation=="PyPy"'
'html5lib', 'html5lib',
], ],
'test:python_version<"3"': [
'enum34',
'mock',
],
'test:python_version>="3"': [
'mypy',
'typed_ast',
],
} }
# for sdist installation with pip-1.5.6
if sys.platform == 'win32':
requires.append('colorama>=0.3.5')
if sys.version_info < (3, 5):
requires.append('typing')
# Provide a "compile_catalog" command that also creates the translated # Provide a "compile_catalog" command that also creates the translated
# JavaScript files if Babel is available. # JavaScript files if Babel is available.
@ -90,10 +90,7 @@ cmdclass = {}
try: try:
from babel.messages.pofile import read_po from babel.messages.pofile import read_po
from babel.messages.frontend import compile_catalog from babel.messages.frontend import compile_catalog
try: from json import dump
from simplejson import dump
except ImportError:
from json import dump
except ImportError: except ImportError:
pass pass
else: else:

View File

@ -1,20 +0,0 @@
flake8
pytest>=3.0
pytest-cov
mock
six>=1.4
Jinja2>=2.3
Pygments>=2.0
docutils>=0.11
snowballstemmer>=1.1
babel
sqlalchemy>=0.9
whoosh>=2.0
alabaster
sphinx_rtd_theme
sphinxcontrib-websupport
imagesize
requests
html5lib
enum34
typing

26
tox.ini
View File

@ -1,16 +1,15 @@
[tox] [tox]
envlist=flake8,py27,py34,py35,py36,pypy,du14,du13,du12,du11 minversion=2.0
envlist=flake8,mypy,py{27,34,35,36},pypy,du{11,12,13,14}
[testenv] [testenv]
passenv = https_proxy http_proxy no_proxy passenv = https_proxy http_proxy no_proxy
deps= # TODO(stephenfin) Replace this with the 'extras' config option when tox 2.4 is
six # widely available, likely some time after the Ubuntu 18.04 release
pytest #
pytest-cov # https://tox.readthedocs.io/en/latest/config.html#confval-extras=MULTI-LINE-LIST
html5lib deps =
mock .[test,websupport]
enum34
typing
setenv = setenv =
SPHINX_TEST_TEMPDIR = {envdir}/testbuild SPHINX_TEST_TEMPDIR = {envdir}/testbuild
commands= commands=
@ -18,11 +17,6 @@ commands=
--durations 25 {posargs} --durations 25 {posargs}
sphinx-build -q -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html sphinx-build -q -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html
[testenv:pypy]
deps=
simplejson
{[testenv]deps}
[testenv:du11] [testenv:du11]
deps= deps=
docutils==0.11 docutils==0.11
@ -59,10 +53,6 @@ deps=
{[testenv]deps} {[testenv]deps}
[testenv:py35] [testenv:py35]
deps=
mypy
typed_ast
{[testenv]deps}
commands= commands=
{envpython} -Wall tests/run.py --cov=sphinx --durations 25 {posargs} {envpython} -Wall tests/run.py --cov=sphinx --durations 25 {posargs}
sphinx-build -q -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html sphinx-build -q -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html