From 101ac4c1af37f7ceba57ff5de1a1858ff90a60c0 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Sat, 27 Feb 2016 14:39:56 -0800 Subject: [PATCH] switch to tox for running tests --- .travis.yml | 7 ++++--- README.md | 3 +++ tox.ini | 22 ++++++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 tox.ini diff --git a/.travis.yml b/.travis.yml index 16a86d0..1d1bee0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,9 @@ python: - "3.3" - "3.4" - "3.5" +env: + - TOXENV=py install: - - pip install . "Twisted>=15.5.0" pyflakes + - pip install tox script: - - pyflakes src - - trial wormhole + - tox diff --git a/README.md b/README.md index da36095..7acfeed 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,9 @@ and do not need to be memorized. On Debian/Ubuntu systems, you may first need `apt-get python-dev libffi-dev`. On OS-X, you may need to install `pip`. +Developers can clone the source tree and run `tox` to run the unit tests on +all supported (and installed) versions of python: 2.7, 3.3, 3.4, and 3.5. + ## Motivation * Moving a file to a friend's machine, when the humans can speak to each diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..2208e10 --- /dev/null +++ b/tox.ini @@ -0,0 +1,22 @@ +# 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,meta +skip_missing_interpreters = True + +[testenv] +deps = + twisted + coverage +commands = + trial {posargs:wormhole} + +[testenv:meta] +deps = + pyflakes +commands = + pyflakes setup.py src + wormhole --version