4e97bb041a
test_ipaddrs.py had an invalid regexp, caught by the latest version of flake8 The new flake8 complains about both W503 (line break inside a conditional before a binary operator) and W504 (line break *after* the operator). I think break-before is the new preferred style, but for now I'm just going to ignore them both and leave the code alone.
48 lines
1.4 KiB
INI
48 lines
1.4 KiB
INI
# 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]
|
|
envlist = {py27,py34,py35,py36,py37,pypy,flake8}
|
|
skip_missing_interpreters = True
|
|
minversion = 2.4.0
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
extras = dev
|
|
deps =
|
|
pyflakes >= 1.2.3
|
|
commands =
|
|
pyflakes setup.py src
|
|
wormhole --version
|
|
python -m wormhole.test.run_trial {posargs:wormhole}
|
|
|
|
|
|
# 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
|
|
# 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.
|
|
|
|
[testenv:coverage]
|
|
deps =
|
|
pyflakes >= 1.2.3
|
|
coverage
|
|
commands =
|
|
pyflakes setup.py src
|
|
wormhole --version
|
|
coverage run --branch -m wormhole.test.run_trial {posargs:wormhole}
|
|
coverage xml
|
|
|
|
[testenv:flake8]
|
|
deps = flake8
|
|
commands = flake8 src/wormhole
|
|
|
|
[flake8]
|
|
ignore = E741,W503,W504
|
|
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
|
|
max-complexity = 40
|