2016-02-27 22:39:56 +00:00
|
|
|
# Tox (http://tox.testrun.org/) is a tool for running tests
|
|
|
|
# in multiple virtualenvs. This configuration file will run the
|
|
|
|
# test suite on all supported python versions. To use it, "pip install tox"
|
|
|
|
# and then run "tox" from this directory.
|
|
|
|
|
|
|
|
[tox]
|
2019-02-10 19:02:15 +00:00
|
|
|
# useful envs: py27-nodilate, py34-nodilate, py35, py36, py37, pypy, flake8
|
|
|
|
envlist = {py27-nodilate,py34-nodilate,py35,py36,py37}
|
2016-02-27 22:39:56 +00:00
|
|
|
skip_missing_interpreters = True
|
2017-01-17 03:35:10 +00:00
|
|
|
minversion = 2.4.0
|
2016-02-27 22:39:56 +00:00
|
|
|
|
|
|
|
[testenv]
|
2017-01-17 03:35:10 +00:00
|
|
|
usedevelop = True
|
2019-02-10 19:02:15 +00:00
|
|
|
extras =
|
|
|
|
nodilate: dev
|
|
|
|
!nodilate: dev, dilate
|
2016-02-27 22:39:56 +00:00
|
|
|
deps =
|
2016-05-12 23:43:46 +00:00
|
|
|
pyflakes >= 1.2.3
|
2019-02-10 19:02:15 +00:00
|
|
|
coverage: coverage
|
2016-02-27 22:39:56 +00:00
|
|
|
commands =
|
2016-04-21 01:54:10 +00:00
|
|
|
pyflakes setup.py src
|
2016-03-02 21:35:12 +00:00
|
|
|
wormhole --version
|
2019-02-10 19:02:15 +00:00
|
|
|
!coverage: python -m wormhole.test.run_trial {posargs:wormhole}
|
|
|
|
coverage: coverage run --branch -m wormhole.test.run_trial {posargs:wormhole}
|
|
|
|
coverage: coverage xml
|
2016-02-27 22:39:56 +00:00
|
|
|
|
2016-02-26 18:51:58 +00:00
|
|
|
# on windows, trial is installed as venv/bin/trial.py, not .exe, but (at
|
|
|
|
# least appveyor) adds .PY to $PATHEXT. So "trial wormhole" might work on
|
2017-01-15 21:23:23 +00:00
|
|
|
# windows, and certainly does on unix. But to get "coverage run" to work, we
|
|
|
|
# need a script name (since "python -m twisted.scripts.trial" doesn't have a
|
|
|
|
# 'if __name__ == "__main__": run()' -style clause), and the script name will
|
|
|
|
# vary on the platform. So we added a small class (wormhole.test.run_trial)
|
|
|
|
# that does the right import for us.
|
2016-05-24 23:03:39 +00:00
|
|
|
|
2018-04-21 07:30:25 +00:00
|
|
|
[testenv:flake8]
|
|
|
|
deps = flake8
|
|
|
|
commands = flake8 src/wormhole
|
|
|
|
|
|
|
|
[flake8]
|
2018-11-13 18:21:41 +00:00
|
|
|
ignore = E741,W503,W504
|
2018-04-21 07:30:25 +00:00
|
|
|
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
|
2018-06-16 23:13:22 +00:00
|
|
|
max-complexity = 40
|
2019-02-10 19:02:15 +00:00
|
|
|
|
|
|
|
[testenv:flake8less]
|
|
|
|
deps = flake8
|
|
|
|
commands = flake8 --select=E901,E999,F821,F822,F823 src/wormhole
|
2019-05-05 22:02:00 +00:00
|
|
|
|
|
|
|
[testenv:docs]
|
|
|
|
deps =
|
|
|
|
sphinx
|
|
|
|
recommonmark
|
|
|
|
skip_install = True
|
|
|
|
commands =
|
|
|
|
sphinx-build -b html -d {toxinidir}/docs/_build/doctrees {toxinidir}/docs {toxinidir}/docs/_build/html
|