magic-wormhole/tox.ini

42 lines
1.7 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,py33,py34,py35
skip_missing_interpreters = True
# There's a race-condition bug in Twisted-15.5.0 (#8014, fixed in trunk) that
# manifests as various intermittent magic-wormhole test failures that always
# include twisted.internet.endpoints "iterateEndpoint" or "checkDone". So run
# all builds with a copy of Twisted from git 'trunk' until Twisted-16.0.0 is
# released and we can just depend on that.
# 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.
[testenv]
deps =
git+https://github.com/twisted/twisted#egg=twisted
#twisted
pyflakes
{env:EXTRA_DEPENDENCY:}
commands =
pyflakes setup.py src
wormhole --version
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. 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.