forked from Yelp/py_zipkin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
40 lines (34 loc) · 1.32 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
[tox]
envlist = pre-commit, py27, py34, py35, py36, pypy, flake8
[testenv]
deps = -rrequirements-dev.txt
extras = protobuf
commands =
coverage erase
# Check that we have 100% unit test coverage, without counting integration tests
coverage run --source=py_zipkin/ -m pytest --ignore=tests/integration -vv {posargs:tests}
coverage report -m --show-missing --fail-under 100
# Now run integration tests
py.test -vv tests/integration
[testenv:pypy]
# Don't use wheel for thriftpy2. When creating the pypy virtualenv pip generates a generic
# py2-py3 wheel that gets put in the cache and from then on reused also for CPython. That causes
# thriftpy2 imports to fail with `ModuleNotFoundError: No module named 'thriftpy2.protocol.cybin'`
# since those expect those modules to have been compiled to `.so`.
install_command = python -m pip install --no-binary thriftpy2 {opts} {packages}
[testenv:pre-commit]
basepython = python3.6
deps = pre-commit
commands =
pre-commit install -f --install-hooks
pre-commit run --all-files {posargs}
[testenv:flake8]
basepython = python3.6
deps = flake8
commands =
flake8 py_zipkin tests
[flake8]
exclude = .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,docs,py_zipkin/encoding/protobuf/zipkin_pb2.py
max_line_length = 83
[coverage:report]
omit = py_zipkin/encoding/protobuf/zipkin_pb2.py