Update docs tests
This commit is contained in:
parent
284b86ebb6
commit
bb9702910b
|
@ -1,3 +1,8 @@
|
|||
twisted
|
||||
pyopenssl
|
||||
sphinxcontrib-napoleon
|
||||
mock
|
||||
pyxdg
|
||||
service_identity
|
||||
PIL
|
||||
mako
|
||||
|
|
|
@ -52,7 +52,7 @@ MOCK_MODULES = ['deluge.ui.languages', 'deluge.ui.countries', 'deluge.ui.gtkui.g
|
|||
'libtorrent', 'psyco', 'rencode',
|
||||
'twisted.web', 'twisted.web.client', 'twisted.web.error',
|
||||
'win32file', 'win32event', 'win32gui', 'win32api', 'win32con', '_winreg',
|
||||
'pygtk', "gtk", "gobject", "gtk.gdk", "pango", "cairo", "pangocairo"]
|
||||
'pygtk', "gtk", "gobject", "gtk.gdk", "pango", "cairo", "pangocairo", "chardet"]
|
||||
|
||||
for mod_name in MOCK_MODULES:
|
||||
sys.modules[mod_name] = Mock()
|
||||
|
|
49
tox.ini
49
tox.ini
|
@ -107,25 +107,12 @@ deps =
|
|||
commands=
|
||||
sh -c "flake8 --max-complexity 10 deluge || true"
|
||||
|
||||
[testenv:docscoverage]
|
||||
changedir=docs
|
||||
install_command=pip install {opts} {packages}
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
sphinx
|
||||
sphinxcontrib-napoleon
|
||||
coverage
|
||||
pytest-cov
|
||||
whitelist_externals=
|
||||
{[testenv]whitelist_externals}
|
||||
mkdir
|
||||
sphinx-build
|
||||
commands=
|
||||
mkdir -p build/doccoverage
|
||||
sphinx-build -W -b coverage -d build/doctrees source build/doccoverage
|
||||
py.test --doctest-glob='*.rst'
|
||||
# We do not have all dependencies on RTD and travis so we exclude the
|
||||
# site packages (sitepackages=False) when building docs so that local
|
||||
# tests have a similar environment.
|
||||
|
||||
[testenv:docs]
|
||||
[docsbase]
|
||||
sitepackages=False
|
||||
changedir=docs
|
||||
install_command=pip install {opts} --allow-external PIL --allow-unverified PIL {packages}
|
||||
whitelist_externals=
|
||||
|
@ -135,6 +122,32 @@ deps =
|
|||
{[testenv]deps}
|
||||
sphinx
|
||||
sphinxcontrib-napoleon
|
||||
mock
|
||||
PIL
|
||||
commands=
|
||||
sphinx-build -E -W -b html -d build/doctrees source build/html
|
||||
|
||||
[testenv:docs]
|
||||
sitepackages={[docsbase]sitepackages}
|
||||
changedir={[docsbase]changedir}
|
||||
install_command={[docsbase]install_command}
|
||||
whitelist_externals={[docsbase]whitelist_externals}
|
||||
deps={[docsbase]deps}
|
||||
commands=
|
||||
sphinx-build -v -E -T -b html -d build/doctrees source build/html
|
||||
|
||||
[testenv:docscoverage]
|
||||
sitepackages={[docsbase]sitepackages}
|
||||
changedir={[docsbase]changedir}
|
||||
install_command={[docsbase]install_command}
|
||||
whitelist_externals=
|
||||
{[docsbase]whitelist_externals}
|
||||
mkdir
|
||||
deps=
|
||||
{[docsbase]deps}
|
||||
coverage
|
||||
pytest-cov
|
||||
commands=
|
||||
mkdir -p build/doccoverage
|
||||
sphinx-build -W -b coverage -d build/doctrees source build/doccoverage
|
||||
py.test --doctest-glob='*.rst'
|
||||
|
|
Loading…
Reference in New Issue