test

请不要把重要的私人代码放到本gitlab服务器,本服务器是用于测试和学习,会不定期清理私人的代码仓库,敬请谅解。

tox.ini 1.51 KB
Newer Older
penxiao's avatar
penxiao committed
1 2 3 4 5 6 7 8
# 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]
# List the environment that will be run by default
minversion = 1.6
penxiao's avatar
penxiao committed
9
envlist = py27, py34, pep8, docs
penxiao's avatar
penxiao committed
10 11 12 13 14 15 16 17 18 19 20 21 22
skipsdist = True

[testenv]
setenv = VIRTUAL_ENV={envdir}
         LANG=en_US.UTF-8
         LANGUAGE=en_US:en
         LC_ALL=C

[testenv:py27]
deps = -r{toxinidir}/test-requirements.txt
       -r{toxinidir}/requirements.txt


penxiao's avatar
penxiao committed
23 24 25 26 27 28 29 30
commands =
    coverage run manage.py test
    coverage report -m

[testenv:py34]
deps = -r{toxinidir}/test-requirements.txt
       -r{toxinidir}/requirements.txt

penxiao's avatar
penxiao committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
commands =
    coverage run manage.py test
    coverage report -m

[testenv:pep8]
sitepackages = False
deps = -r{toxinidir}/test-requirements.txt
commands =
    flake8 {posargs}

[flake8]
# E712 is ignored on purpose, since it is normal to use 'column == true'
# in sqlalchemy.
# H803 skipped on purpose per list discussion.
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
# The rest of the ignores are TODOs
# New from hacking 0.9: E129, E131, E265, E713, H407, H405, H904
# Stricter in hacking 0.9: F402
# E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301

max-line-length=120
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools

[testenv:docs]
deps=
    sphinx
    sphinx_rtd_theme
commands = sphinx-build -W -b html doc/source doc/build