generated from reithmeier/PythonArchetype
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
48 lines (40 loc) · 889 Bytes
/
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
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py{36}
[testenv]
deps =
# default dependencies
setuptools
pytest
coverage
black
isort
pylint
flake8
pytest-cov
# dependencies
numpy
matplotlib
commands =
# install project in virtual environment
# for coverage to give correct results
pip install -e .
# erase old coverage data
coverage erase
# reformat files
black .
isort .
# linter
pylint ./src ./tests
flake8 ./src ./tests
# run pytest with coverage
py.test tests --cov ./src/ --cov-fail-under 80
[coverage:run]
omit = *tests*
branch = true
[flake8]
# black auto formats to 88
max-line-length = 88