forked from hellofresh/appboy-python-client
-
Notifications
You must be signed in to change notification settings - Fork 14
/
tox.ini
66 lines (57 loc) · 1.24 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
[tox]
envlist = style, py27, py37
# Configs
[pytest]
addopts = -p no:warnings
# Local Unit
[testenv]
deps =
codecov
freezegun == 0.3.11
mock
pytest
pytest-cov
pytest-mock
requests-mock >= 1.3, < 2
commands =
pytest {posargs: --cov --cov-report=html}
[testenv:test-coverage]
deps =
coverage>=4.5.0
commands =
coverage report --skip-covered -m --fail-under=100 --include="tests/*" --omit="tests/conftest.py"
[testenv:py27]
basepython = python2.7
deps = {[testenv]deps}
commands = {[testenv]commands}
[testenv:py37]
basepython = python3.7
deps = {[testenv]deps}
commands = {[testenv]commands}
[testenv:style]
basepython = python3.7
skip_install = true
deps =
flake8 >= 3.0.4
flake8-docstrings
flake8-comprehensions
flake8-bugbear
{[testenv:format]deps}
commands =
; Check style violations
flake8
; Check that imports are sorted/formatted appropriately
isort --check-only --recursive
; Check formatting
black --check .
; Run isort and black on a particular file or directory
[testenv:format]
basepython = python3.7
skip_install = true
deps =
isort >= 4.2.14
black
commands =
; Default to the entire codebase
isort --recursive {posargs: --apply}
black {posargs: .}