-
Notifications
You must be signed in to change notification settings - Fork 100
/
tox.ini
64 lines (53 loc) · 1.44 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
[tox]
envlist = py36, py37, py38, pylint, flake8, integration_tests, noimport, pre-commit
skip_missing_interpreters = True
[gh-actions]
python =
3.6: py36, flake8, pylint, noimport
3.7: py37
3.8: py38, pre-commit
[testenv]
# only run unit tests as they do not need additional hardware
passenv = GITHUB_*
deps =
-rrequirements.txt
-rrequirements-test.txt
commands =
pytest --cov=miflora --timeout=10 test/unit_tests
coveralls --service=github
[testenv:pre-commit]
description = format the code
deps =
{[testenv]deps}
pre-commit >= 2, < 3
commands =
pre-commit run --all-files --show-diff-on-failure
[testenv:noimport]
# run tests without installing any Bluetooth libraries
deps= -rrequirements-test.txt
commands = pytest --timeout=10 test/no_imports
[testenv:integration_tests]
#there tests are run separately as they require real hardware
#need the command line argument --mac=<some mac> to work
commands = pytest --timeout=60 {posargs}
[testenv:flake8]
base=python3
ignore_errors=True
commands=flake8 demo.py setup.py miflora test
[testenv:pylint]
basepython = python3
skip_install = true
commands = pylint -j4 miflora test setup.py demo.py
[flake8]
install-hook=git
max-line-length = 100
ignore = E501, W503, E203, E266
max-complexity = 18
select = B, C, E, F, W, T4, B9
exclude = .git, .tox, __pycache__, dist
[isort]
profile = black
[mypy]
strict_optional = True
disallow_untyped_calls = True
ignore_missing_imports = True