~rashi007/mailman/docsfix

7254.1.1 by Barry Warsaw
Tox-ify the test suite. Now you don't have to create a virtualenv separately.
1
[tox]
2
envlist = py27
3
recreate = True
4
5
[testenv]
6
commands = python -m nose2 -v
7
#sitepackages = True
8
usedevelop = True
7257 by Barry Warsaw
* You no longer have to edit `src/mailman/testing/testing.cfg` to run the
9
10
# This environment requires you to set up PostgreSQL and create a .cfg file
11
# somewhere outside of the source tree.
12
[testenv:pg]
13
basepython = python2.7
14
commands = python -m nose2 -v
15
usedevelop = True
16
deps = psycopg2
7257.1.1 by Barry Warsaw
The start of a coverage branch.
17
18
[coverage]
19
rcfile = {toxinidir}/coverage.ini
20
rc = --rcfile={[coverage]rcfile}
21
22
[testenv:coverage]
23
basepython = python2.7
24
commands =
25
    coverage run {[coverage]rc} -m nose2 -v
26
    coverage combine {[coverage]rc}
7257.1.2 by Barry Warsaw
* Improve test coverage a bit.
27
    coverage html {[coverage]rc}
7257.1.1 by Barry Warsaw
The start of a coverage branch.
28
#sitepackages = True
29
usedevelop = True
30
whitelist_externals = python-coverage
31
deps = coverage
32
# Don't use --pre version packages.
33
install_command = pip install {opts} {packages}
34
setenv =
35
    COVERAGE_PROCESS_START={[coverage]rcfile}
36
    COVERAGE_OPTIONS="-p"
37
    COVERAGE_FILE={toxinidir}/.coverage