forked from level12/keg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
58 lines (47 loc) · 1.8 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
[tox]
# The default environment list represents what should be ran by the developer. See .travis.yml
# for the setup used in CI testing.
# TODO: we can't actually combine coverage yet because pytest-cov doesn't support it. Need to wait
# for pytest-cov 2.0 before coverage represents both versions.
envlist = coverage-init,py27,py34,coverage-report,flake8
[testenv]
# this uses pip -e, which we want b/c we are going to hijack the install command
usedevelop = true
install_command =
pip install --use-wheel --no-index --find-links=requirements/wheelhouse {opts} {packages}
# Always recreate the virtualenv so that we are confident dependencies are specified correctly.
# This is a bit slow, but due to the wheelhouse, it shouldn't be a lot slower.
recreate = true
passenv = LANG TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
commands =
# install deps ourself from the wheelhouse. This is fast b/c it doesn't hit the network and
# doesn't depend on broken requirements file support in tox. If that get's fixed properly,
# this method may not be needed.
# https://bitbucket.org/hpk42/tox/issue/149/virtualenv-is-not-recreated-when-deps
pip install --use-wheel --no-index --find-links=requirements/wheelhouse -r requirements/testing.txt
py.test -q --tb native --strict --cov keg --cov keg_apps --no-cov-on-fail keg
[testenv:coverage-init]
skip_install = true
usedevelop = false
deps = coverage
commands = coverage erase
[testenv:coverage-report]
skip_install = true
usedevelop = false
deps = coverage
commands=
coverage combine
coverage html
[testenv:flake8]
skip_install = true
usedevelop = false
deps = flake8
commands = flake8 keg keg_apps
[testenv:coveralls]
skip_install = true
usedevelop = false
deps = coveralls
commands = coveralls
[flake8]
max-line-length = 100
exclude=.hg,.tox,dist,doc,*egg,build