-
Notifications
You must be signed in to change notification settings - Fork 117
/
tox.ini
68 lines (61 loc) · 2.07 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
[tox]
envlist = {py27,py36,py37}-{default,fido}, {py27,py36,py37}-fido-requests2dot17, mypy, pre-commit
[testenv]
deps =
py27: pyrsistent<0.17
swagger-spec-validator<3.0.0; python_version<"3.7"
-rrequirements-dev.txt
fido: .[fido]
requests2dot17: requests==2.17.0
setenv =
default: PYTEST_ADDOPTS=--ignore=tests/fido_client --ignore=tests/integration/fido_client_test.py
commands =
python -m pytest --capture=no {posargs:tests}
[testenv:pre-commit]
skip_install = True
basepython = python3.7
deps = pre-commit>=0.12.0
setenv =
LC_CTYPE=en_US.UTF-8
commands =
pre-commit install --install-hooks
pre-commit {posargs:run --all-files}
[testenv:mypy]
basepython = python3.7
deps =
# TODO: Latest twisted (>=21) and mypy (0.8XX) don't get along. Remove when they're friends again.
#
# LOG: Bailing due to parse errors
# LOG: Build finished in 0.355 seconds with 40 modules, and 1 errors
# .tox/mypy/lib/python3.7/site-packages/twisted/internet/error.py:18: error: invalid syntax
# Found 1 error in 1 file (errors prevented further checking)
#
# See also https://github.com/twisted/twisted/commit/84b79b7bdc164b17877199c27d7e3ff90a8b4e6d
Twisted<21
# since we run in py 2.7 compatible mode, swagger-spec-validator>=3.0.0 causes syntax errors
swagger-spec-validator<3.0.0
-rrequirements-dev.txt
.[fido]
mypy==0.790
commands =
mypy bravado tests
[testenv:cover]
deps =
-rrequirements-dev.txt
.[fido]
coverage
commands =
coverage run --source=bravado/ --omit=bravado/__about__.py -m pytest --capture=no --strict {posargs:tests/}
coverage report --omit=.tox/*,tests/*,/usr/share/pyshared/*,/usr/lib/pymodules/* -m
[testenv:docs]
deps =
-rrequirements-docs.txt
changedir = docs
commands = sphinx-build -b html -d build/doctrees source build/html
[flake8]
exclude = .svn,CVS,.bzr,.hg,.git,__pycache__,.tox,docs,virtualenv_run
max_line_length = 120
[pytest]
# tests/petstore/* are temporary and hit the swagger pet store directly.
# disable them when builds are run.
norecursedirs = petstore