commit 35edcf44cd741806bb29100c217ad9a3092644be
Author: Foxboron <mcfoxax(a)gmail.com>
Date: Sat Jan 3 01:21:52 2015 +0100
tox support
---
docs/faq.rst | 34 ++++++++++++++++++++++++++++++++++
requirements.txt | 5 +++++
tox.ini | 11 +++++++++++
3 files changed, 50 insertions(+)
diff --git a/docs/faq.rst b/docs/faq.rst
index 97dc4cc..27aaccf 100644
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -504,6 +504,40 @@ of all test runs.
See ``run_tests.py --help`` for more usage information.
+.. _how_do_i_test_compatibility_with_multiple_versions_of_python
+How can I test compatibility with multiple versions of python?
+--------------------------------------------------------------
+
+Stem got support for python 2.6-3.4, testing against all these versions can be
+delt with using tox. Fetch the ``python-dev`` package from your package manager
+and fetch the respective python versions you want to test against.
+
+Example using a debian based distro:
+
+::
+
+ ~/stem$ sudo apt-get install python-tox
+ ~/stem$ sudo apt-get install python2.6
+ ~/stem$ sudo apt-get install python3.3
+ ~/stem$ tox
+ ...
+ ____ summary _____
+ py26: commands succeeded
+ py33: commands succeeded
+ congratulations :)
+
+Tox also allows for customization of arguments for underlying commands and
+enviorments. Examples below.
+
+::
+
+ # Run tox with a specefied enviorment
+ ~/stem$ tox -e py26
+
+ # Run tox with positonal args for `run_tests.py`
+ # in a specefied enviorment
+ ~/stem$ tox -e py26 -- -u --test response.events
+
.. _how_do_i_build_the_site:
How do I build the site?
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..85d85f1
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,5 @@
+mock
+pyflakes
+pep8
+pycrypto
+tox
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..afede25
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,11 @@
+[tox]
+envlist = py26,py27,py31,py32,py33,py34
+skipsdist = True
+
+[testenv]
+commands =
+ pip install --allow-all-external -e .
+ python run_tests.py {posargs:-a}
+deps =
+ -rrequirements.txt
+