forked from Yelp/mysql_streamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
69 lines (58 loc) · 2.17 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
59
60
61
62
63
64
65
66
67
68
69
[tox]
envlist = py27, docs, pre-commit
basepython = python2.7
skipsdist = true
indexserver =
default = https://pypi.yelpcorp.com/simple/
[testenv]
basepython = python2.7
envdir = venv/py27
setenv =
PIP_INDEX_URL = https://pypi.yelpcorp.com/simple
venv_update = {toxinidir}/bin/venv-update venv= {envdir} install=
commands =
{[testenv]venv_update} -r {toxinidir}/requirements.txt
[testenv:py27]
commands =
{[testenv]venv_update} -r {toxinidir}/requirements.d/dev.txt -r {toxinidir}/requirements.txt
py.test -c tox.ini --cov-config .coveragerc --cov=replication_handler --maxfail=3 tests/
[testenv:docs]
envdir = venv/docs
commands =
{[testenv]venv_update} -r {toxinidir}/requirements.d/docs.txt -r {toxinidir}/requirements.txt
sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html
[flake8]
ignore = E125, E302, C901
max-line-length = 160
max-complexity = 10
exclude = .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,./build,docs,virtualenv_run
[testenv:devenv]
commands =
{[testenv]venv_update} -r {toxinidir}/requirements.d/dev.txt -r {toxinidir}/requirements.txt
[testenv:devenv-command]
commands =
{[testenv]venv_update} -r {toxinidir}/requirements.d/dev.txt -r {toxinidir}/requirements.txt
{posargs}
[testenv:pre-commit]
basepython = python2.7
envdir = venv/pre-commit
commands =
{[testenv]venv_update} -r {toxinidir}/requirements.d/pre_commit.txt
pre-commit {posargs}
[testenv:itest]
commands =
{[testenv]venv_update} -r {toxinidir}/requirements.d/dev.txt -r {toxinidir}/requirements.txt
py.test -m "itest" --ignore=setup.py -vv {posargs} tests/
[testenv:itest_db]
commands =
{[testenv]venv_update} -r {toxinidir}/requirements.d/dev.txt -r {toxinidir}/requirements.txt
py.test -m "itest_db" --ignore=setup.py -vv tests/
[pytest]
addopts = -m "not itest" --ignore=setup.py --doctest-glob=*.rst -vv
[pep8]
# E265 deals with spacing inside of comments - breaks human formatting
# E309 puts a blank line after class declarations - doesn't work well with docstrings
# E501 reformats lines to fit in --max-line-length poorly
# E265 block comment should start with '# '
# E402 module level import not at top of file
ignore = E265,E309,E501,E265