-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
48 lines (41 loc) · 1.16 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
[tox]
requires = tox>=4
env_list = py310, black, flake8
[testenv]
description = Run unit tests
passenv = WORKBENCH_CONFIG
deps =
pytest
pytest-sugar
coverage
pytest-cov
.[all]
commands = pytest --assert=plain -x -m "not long" {posargs:tests}
[testenv:verbose]
description = Run tests with verbose logging
passenv = {[testenv]passenv}
deps = {[testenv]deps}
commands = pytest --assert=plain -x -m "not long" -s {posargs:tests}
[testenv:py39]
description = Run tests with Python 3.9
basepython = python3.9
deps = {[testenv]deps}
commands = pytest --assert=plain -x -m "not long" -s {posargs:tests}
[testenv:long]
description = Run long-duration tests
setenv = WORKBENCH_DEBUG = True
commands = pytest --assert=plain -x -v -s -m "long" {posargs:tests}
[testenv:flake8]
description = Run Flake8 linter
skip_install = true
deps = flake8
commands = flake8 --exclude '*generated*' src/workbench applications tests
[testenv:black]
description = Run black formatter
skip_install = true
deps = black>=22.12
commands = black --line-length=120 {posargs:.}
[testenv:all]
description = Run all environments
deps = tox>=4
commands = tox -e black -e flake8 -e py310 -e long