forked from hypothesis/h
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
142 lines (137 loc) · 5.82 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
[tox]
envlist = tests
skipsdist = true
minversion = 3.16.1
requires =
tox-pip-extensions
tox-pyenv
tox-envfile
tox-run-command
tox_pip_extensions_ext_venv_update = true
# Exclusively use Python commands from pyenv's copies of Python, don't fall
# back to tox's default non-pyenv command search strategy.
tox_pyenv_fallback = false
[pytest]
filterwarnings =
# Fail the tests if there are any warnings.
error
# Ignore certain specific warnings. One line per warning to ignore. The
# pattern is:
#
# ignore:<WARNING_MESSAGE>:<WARNING_CATEGORY>:<MODULE>
#
# <WARNING_MESSAGE> is a regex that must match the warning message that you
# want to ignore.
#
# <WARNING_CATEGORY> is the class of the warning that you want to ignore,
# e.g. DeprecationWarning. See:
# https://docs.python.org/2/library/warnings.html#warning-categories
#
# <MODULE> is the name of the module that the warning originates from.
#
# See https://docs.python.org/3/library/warnings.html and
# https://docs.pytest.org/en/latest/warnings.html
#
ignore:^Use of \.\. or absolute path in a resource path is not allowed and will raise exceptions in a future release\.$:DeprecationWarning:pkg_resources
# Ignore WebOb warnings that just say "<method> will be changing in the
# future" and don't say how it will be changing or what developers can do
# now to avoid the warning. I don't think these warnings _can_ be avoided
# currently.
ignore:^The behavior of \.best_match for the Accept classes is currently being maintained for backward compatibility, but the method will be deprecated in the future, as its behavior is not specified in \(and currently does not conform to\) RFC 7231\.$:DeprecationWarning:webob.acceptparse
ignore:^The behavior of \.__contains__ for the Accept classes is currently being maintained for backward compatibility, but it will change in the future to better conform to the RFC\.$:DeprecationWarning:webob.acceptparse
ignore:^The behavior of AcceptValidHeader\.best_match is currently being maintained for backward compatibility, but it will be deprecated in the future, as it does not conform to the RFC\.$:DeprecationWarning:webob.acceptparse
ignore:^The behavior of AcceptValidHeader\.__contains__ is currently being maintained for backward compatibility, but it will change in the future to better conform to the RFC\.$:DeprecationWarning:webob.acceptparse
ignore:^The behavior of AcceptLanguageValidHeader\.__iter__ is currently maintained for backward compatibility, but will change in the future.$:DeprecationWarning:webob.acceptparse
[testenv]
skip_install = true
sitepackages = {env:SITE_PACKAGES:false}
passenv =
HOME
dev: AUTHORITY
dev: BOUNCER_URL
dev: CLIENT_OAUTH_ID
dev: CLIENT_RPC_ALLOWED_ORIGINS
dev: CLIENT_URL
dev: GOOGLE_ANALYTICS_TRACKING_ID
dev: GOOGLE_ANALYTICS_CLIENT_TRACKING_ID
dev: H_GUNICORN_CERTFILE
dev: H_GUNICORN_KEYFILE
dev: SENTRY_DSN
dev: SENTRY_DSN_CLIENT
dev: SENTRY_DSN_FRONTEND
dev: SENTRY_ENVIRONMENT
dev: USE_HTTPS
dev: NEW_RELIC_LICENSE_KEY
dev: NEW_RELIC_APP_NAME
dev: NODE_ENV
{tests,functests}: TEST_DATABASE_URL
{tests,functests}: ELASTICSEARCH_URL
{tests,functests}: PYTEST_ADDOPTS
functests: BROKER_URL
setenv =
PYTHONUNBUFFERED = 1
dev: PYTHONPATH = .
dev: APP_URL = {env:APP_URL:http://localhost:5000}
dev: WEBSOCKET_URL = {env:WEBSOCKET_URL:ws://localhost:5001/ws}
OBJC_DISABLE_INITIALIZE_FORK_SAFETY = YES
deps =
tests: coverage
# Some tests currently fail with pytest 6.x
{tests,functests,analyze}: pytest
{tests,functests,analyze}: factory-boy
{tests,analyze}: hypothesis
lint: flake8
{format,checkformatting}: black
{format,checkformatting}: isort
coverage: coverage
docs: sphinx-autobuild
{docs,checkdocs}: sphinx
{docs,checkdocs}: sphinx_rtd_theme
{functests,analyze}: webtest
{tests,functests,analyze}: -r requirements.txt
analyze: pylint
dev: ipython
dev: ipdb
dev: -r requirements-dev.in
docker-compose: docker-compose
# Currently there is an incompatibility between pip-tools>5.x and venv-update
# as pip-tools 5 requires pip>20.x and venv-update requires pip<18.x. This
# can be un-pinned if the conflict is ever resolved
pip-compile: pip-tools<5
whitelist_externals =
{dev,tests,functests,pip-compile}: sh
changedir =
{docs,checkdocs}: docs
depends =
{coverage,functests}: tests
commands =
dev: sh bin/hypothesis --dev init
dev: {posargs:supervisord -c conf/supervisord-dev.conf}
lint: flake8 h
lint: flake8 tests
analyze: pylint {posargs:h tests}
format: black h tests
format: isort --quiet --atomic h tests
checkformatting: black --check h tests
checkformatting: isort --quiet --check-only h tests
{tests,functests}: sh bin/create-testdb
tests: coverage run -m pytest {posargs:tests/h/}
functests: pytest {posargs:tests/functional/}
docs: sphinx-autobuild -BqT -b dirhtml -d {envdir}/doctrees . {envdir}/html
checkdocs: sphinx-build -qTWn -b dirhtml -d {envdir}/doctrees . {envdir}/html
coverage: -coverage combine
coverage: coverage report
docker-compose: docker-compose {posargs}
pip-compile: pip-compile {posargs}
[testenv:dev]
# By default when you Ctrl-c the `make dev` command tox is too aggressive about
# killing supervisor. tox kills supervisor before supervisor has had time to
# stop or kill its child processes, resulting in detached child processes being
# left running and other problems.
#
# Fix this by configuring tox to wait a long time before sending any further
# SIGINTs (after the first one) or SIGTERMs or SIGKILLs to supervisor.
# Just trust supervisor to clean up all its child processes and stop.
suicide_timeout = 60.0
interrupt_timeout = 60.0
terminate_timeout = 60.0