-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
57 lines (54 loc) · 1.41 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
[tox]
envlist = py27, py37, lint
[testenv]
extras =
!py27: bowler
passenv =
; Pass the Travis CI environment variables for codecov reports
CI
TRAVIS
TRAVIS_*
; Allow turning on deprecation warnings and other warnings
PYTHONWARNINGS
PYTEST_*
setenv =
; Needed to report coverage on pytest plugins
; https://pytest-cov.readthedocs.io/en/latest/plugins.html#plugin-coverage
COV_CORE_SOURCE=
COV_CORE_CONFIG={toxinidir}/setup.cfg
COV_CORE_DATAFILE={toxinidir}/.coverage
deps =
pytest
pytest-mock
pytest-cov
pytest-randomly
click
commands =
!py27: pytest {posargs: --cov --cov-config={toxinidir}/setup.cfg --cov-append --cov-report=term-missing --cov-fail-under=100}
; Bowler doesn't run on Python 2, so skip those tests
py27: pytest --ignore {toxinidir}/tests/test_add.py --ignore {toxinidir}/tests/test_bowler.py --ignore {toxinidir}/tests/test_remove.py []
[testenv:lint]
basepython = python3.7
usedevelop = false
deps =
flake8
flake8-docstrings
flake8-comprehensions
flake8-bugbear
{[testenv:format]deps}
commands =
; Check formatting
black --check .
; Check linter violations
flake8
; Check that imports are sorted/formatted appropriately
isort --check-only --recursive
[testenv:format]
basepython = python3.7
usedevelop = false
deps =
isort
black
commands =
isort --recursive --apply
black .