Skip a test if run as root, as can happen with GL shared runners
[mailman.git] / tox.ini
blob60df374ab97bda6753f7a5e87e7b795cf3004517
1 [tox]
2 envlist = {py34,py35,py36}-{nocov,cov,diffcov}{,-mysql,-pg},qa
3 #recreate = True
4 skip_missing_interpreters = True
6 [testenv]
7 commands =
8 nocov: python -m nose2 -v {posargs}
9 cov,diffcov: python -m coverage run {[coverage]rc} -m nose2 {posargs}
10 cov,diffcov: python -m coverage combine {[coverage]rc}
11 cov: python -m coverage html {[coverage]rc}
12 cov: python -m coverage report -m {[coverage]rc} --fail-under=93
13 diffcov: python -m coverage xml {[coverage]rc}
14 diffcov: diff-cover coverage.xml --html-report diffcov.html
15 diffcov: diff-cover coverage.xml --fail-under=100
16 #sitepackages = True
17 usedevelop = True
18 deps =
19 flufl.testing
20 nose2
21 cov,diffcov: coverage
22 pg: psycopg2
23 mysql: pymysql
24 diffcov: diff_cover
25 passenv =
26 MAILMAN_*
27 PYTHON*
28 setenv =
29 cov: COVERAGE_PROCESS_START={[coverage]rcfile}
30 cov: COVERAGE_OPTIONS="-p"
31 cov: COVERAGE_FILE={toxinidir}/.coverage
33 [testenv:qa]
34 basepython = python3
35 commands =
36 python -m flake8 src
37 deps =
38 flake8>3.0
39 flufl.testing
41 [testenv:docs]
42 basepython = python3
43 commands =
44 python setup.py build_sphinx
45 deps:
46 sphinx
47 docutils==0.12
49 [coverage]
50 rcfile = {toxinidir}/coverage.ini
51 rc = --rcfile={[coverage]rcfile}
53 [flake8]
54 enable-extensions = U4
55 exclude = src/mailman/compat/*.py
56 hang-closing = True
57 jobs = 1
58 max-line-length = 79