forked from autokey/autokey
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.cfg
80 lines (69 loc) · 1.78 KB
/
setup.cfg
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
69
70
71
72
73
74
75
76
77
78
79
80
[bdist_wheel]
universal = 0
[aliases]
test=pytest
[tool:pytest]
log_cli_level=debug
testpaths =
tests
norecursedirs=dist build .tox scripts
addopts =
# --cov-report=xml
--cov-report=term-missing
# --cov-report=html:test_coverage_report_html
# --cov-report=annotate:test_coverage_annotated_source
# Summarise failed tests at the end, including xfails and skips.
-r fa
; -v
[tox:tox]
; envlist = py39,py310,py311,py312
; Only run test environment by default, so just running `tox` is fast
; and doesn't include the overhead of coverage or any other build
; pathways.
; This may not be the most effective way to do this, but it is the only way I
; could find.
envlist = test
; Run other environments/tasks with for example `tox -e clean``
[testenv]
deps =
pytest
pytest-cov
pytest-xvfb
pyhamcrest>=1.8.1
PyQt5
dbus-python
PyGObject
; Pass args to pytest by including them in the tox call after a `--`, eg tox
; -- tests/test_something.py
commands = pytest {posargs}
passenv =
DISPLAY
DBUS_SESSION_BUS_ADDRESS
USER
[testenv:test]
deps = {[testenv]deps}
commands = pytest --no-cov {posargs}
passenv = {[testenv]passenv}
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase
[testenv:coverage]
deps = coverage
{[testenv]deps}
setenv = COVERAGE_FILE = .coverage.{envname}
commands = pytest --cov={envsitepackagesdir}/autokey --cov-append {posargs}
passenv = {[testenv]passenv}
[testenv:report]
deps = coverage
skip_install = true
commands =
coverage combine
coverage report
coverage html
[testenv:lint]
deps = coverage
{[testenv]deps}
flake8
commands = flake8 --count --select=E9,F63,F7,F82 --show-source --statistics --builtins=_ --max-complexity=10 --max-line-length=127 lib/autokey
passenv = {[testenv]passenv}