-
Notifications
You must be signed in to change notification settings - Fork 7
/
tox.ini
74 lines (64 loc) · 1.83 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
[tox]
envlist = py310, py311
skipsdist = true
[testenv]
#deps =
# -r test-requirements.txt
# -r requirements.txt
commands =
pip install -r test-requirements.txt
pip install -r requirements.txt
pip uninstall -y acurl
pip install ./acurl
coverage erase
pytest -- {posargs}
sitepackages = true
setenv =
# In principle this (along with evil tricks elsewhere) should let us
# do line-level profiling of the cython code. However, it just
# causes segfaults in the test suite.... =/
# IS_TOX_BUILD=yes
# For the line-level profiling to work, we need to reinstall acurl
# in the venv each time we run the tests. To do that, we need to
# install it as a regular package not an editable install. To do
# that, tox copies the files (but not the .git directory) to a
# location in /tmp. And then setuptools-scm barfs because it can't
# compute a version. It's all very old-woman-swallowed-a-fly.
SETUPTOOLS_SCM_PRETEND_VERSION=0.0
[pytest]
addopts = --cov
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
[coverage:run]
branch = True
omit =
acurl/tests/*
mite/example.py
source =
acurl
mite
mite_http
mite_browser
mite_selenium
mite_amqp
mite_kafka
mite_websocket
mite_finagle
plugins = Cython.Coverage
[coverage:report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain about missing debug-only code:
def __repr__
if self\.debug
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
ignore_errors = True
[coverage:html]
directory = coverage_html_report