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]
|
2016-06-03 22:01:43 +00:00
|
|
|
envlist = {py27,py33,py34,py35}
|
2016-02-27 22:39:56 +00:00
|
|
|
skip_missing_interpreters = True
|
|
|
|
|
2016-02-26 18:51:58 +00:00
|
|
|
# On windows we need "pypiwin32" installed. It's supposedly possible to make
|
|
|
|
# Twisted do this by depending upon "twisted[windows]" instead of just
|
|
|
|
# "twisted", but when I try this via Appveyor, the extra is ignored.
|
|
|
|
# git+https://github.com/twisted/twisted#egg=twisted{env:TWISTED_EXTRAS:}
|
|
|
|
# #twisted{env:TWISTED_EXTRAS:}
|
|
|
|
# So instead we have the .appveyor.yml set EXTRA_DEPENDENCY=pypiwin32. In
|
|
|
|
# other environments, this variable will be empty, and tox will ignore the
|
|
|
|
# blank value.
|
|
|
|
|
2016-02-27 22:39:56 +00:00
|
|
|
[testenv]
|
|
|
|
deps =
|
2016-05-12 23:43:46 +00:00
|
|
|
pyflakes >= 1.2.3
|
2016-05-22 18:31:00 +00:00
|
|
|
mock
|
2016-06-03 22:01:43 +00:00
|
|
|
install_command= pip install {packages}
|
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
|
2016-06-03 22:01:43 +00:00
|
|
|
python -m wormhole.test.run_trial {posargs:wormhole.test}
|
|
|
|
|
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
|
|
|
|
# windows, and certainly does on unix. 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). The script name will vary on
|
|
|
|
# the platform.
|
2016-05-24 23:03:39 +00:00
|
|
|
|
|
|
|
[testenv:coverage]
|
|
|
|
deps =
|
|
|
|
pyflakes >= 1.2.3
|
|
|
|
mock
|
|
|
|
coverage
|
|
|
|
commands =
|
|
|
|
pyflakes setup.py src
|
|
|
|
wormhole --version
|
|
|
|
coverage run --branch -m wormhole.test.run_trial {posargs:wormhole}
|