-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
115 lines (105 loc) · 2.5 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
[tox]
envlist = cov-init, py{27,3}-py2neo{16,2}, cov-report
# These do not run automatically: lint, typecheck, docs, pypy{,3}-py2neo2
tox_pip_extensions_ext_venv_update = true
[testenv]
passenv = NEO4J_URI COVERAGE_*
setenv =
COVERAGE_FILE = .coverage.{envname}
PY2NEO_COMPAT = {env:PY2NEO_COMPAT:-e../python-py2neo_compat}
extras = test
deps =
{env:PY2NEO_COMPAT}
setuptools_scm
py2neo16: py2neo ~= 1.6.4
py2neo2: py2neo ~= 2.0.8
; pytest-{forked,xdist} results in INTERNALERROR for pytest when run under
; PyCharm with its customized tox/pytest test runners. As a workaround,
; set the PYCHARM_NO_FORK environment variable (with no value) in the
; Run Configuration, which will cause the {env} below to expand to nothing.
; The tests will still run with forking outside of PyCharm, because we
; want to test in as much isolation as possible.
commands =
py.test \
--basetemp={envtmpdir} \
{env:PYCHARM_NO_FORK:--forked} \
--cov=gryaml \
--cov-config={toxinidir}/.coveragerc \
--cov-report=term \
--junit-xml={toxinidir}/junit-{envname}.xml \
--junit-prefix={envname} \
{posargs}
[testenv:lint]
ignore_outcome = True
skip_install = True
deps =
flake8
flake8-docstrings
flake8-formatter-junit-xml
pep8-naming
restructuredtext-lint
commands =
sh -c 'rst-lint --level debug *.rst'
flake8 {env:LINT_ARGS:} {posargs}
whitelist_externals =
sh
[flake8]
max-line-length = 88
exclude =
.git
__pycache__
.tox
.eggs
*.egg
docs/conf.py
build/*
.venv
.idea
.*cache
[testenv:typecheck]
ignore_outcome = True
usedevelop = True
extras = test
deps =
{env:PY2NEO_COMPAT}
py2neo ~= 2.0.0
mypy
typing;python_version<"3.5"
commands =
pip list
mypy --py2 \
{env:TYPECHECK_ARGS:} {posargs:--strict} \
{toxinidir}/src
mypy --py2 --follow-imports=silent \
{env:TYPECHECK_ARGS:} {posargs} \
{toxinidir}/tests
[testenv:docs]
usedevelop = True
passenv = *SPHINX* PAPER*
changedir = docs/
deps =
{env:PY2NEO_COMPAT}
sphinx
setuptools_scm
whitelist_externals =
make
commands =
- make linkcheck
make {posargs:html}
[testenv:cov-init]
skip_install = True
setenv =
COVERAGE_FILE = .coverage
deps = coverage
commands =
coverage erase
[testenv:cov-report]
ignore_outcome = True
skip_install = True
setenv =
COVERAGE_FILE = .coverage
deps = coverage
commands =
- coverage combine
coverage report
coverage html