forked from python-websockets/websockets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
43 lines (31 loc) · 1.09 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
[tox]
envlist = {py34,py35,py36}{,-speedups},coverage,flake8,isort
[testenv]
commands =
; Unfortunately tox has no support for building C extensions.
; Do it manually in the git checkout - that's where tests run.
; Remove any existing compiled extension.
sh -c 'rm -f websockets/*.so'
; Before testing with speedups, compile the extension.
speedups: python setup.py --quiet build_ext --inplace
python -W default -m unittest {posargs}
; After testing with speedups, remove the extension.
speedups: sh -c 'rm websockets/*.so'
whitelist_externals =
sh
[testenv:coverage]
commands =
; Handle speedups as above.
sh -c 'rm -f websockets/*.so'
python setup.py --quiet build_ext --inplace
python -m coverage erase
python -W default -m coverage run --branch --source=websockets -m unittest
python -m coverage report --show-missing --fail-under=100
speedups: sh -c 'rm websockets/*.so'
deps = coverage
[testenv:flake8]
commands = flake8 websockets
deps = flake8
[testenv:isort]
commands = isort --check-only --recursive websockets
deps = isort