From 53638cf2564cc649411cf974a3562e8706e6dae7 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 29 Sep 2015 13:52:07 -0700 Subject: framework: add tox testing support tox is a python test manager that runs the tests in isolated environments with their own copies of dependent libraries, and can be used to test against multiple versions of python. This allows us to easily test the framework with and without the acceleration modules it can optionally use (simplejson and lxml), it will also allow us to test against multiple versions of python 3.x (which we support for the generators, and presumably will support in the future) This uses the coverage module, and uses nose's cover-tests option. Unfortunately nose assumes that anything /[Tt]est/ is a test, and hides the tests for the test package. This might be resolvable by modifying the regex, but it isn't something straightforward to fix. Using --cover-tests will get us the test package, but it also gets us the tests package. Signed-off-by: Dylan Baker --- tox.ini | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tox.ini (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..c29014c87 --- /dev/null +++ b/tox.ini @@ -0,0 +1,16 @@ +[tox] +envlist = py27-{noaccel,accel} +skipsdist=True + +[testenv] +deps = + mako + numpy + six + nose + coverage + accel: simplejson + accel: lxml + accel: backports.lzma +passenv=HOME +commands = nosetests framework/tests --attr="!privliged" --with-cover --cover-package=framework --cover-tests -- cgit v1.2.3