-
Notifications
You must be signed in to change notification settings - Fork 15
/
tox.ini
71 lines (60 loc) · 1.55 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
65
66
67
68
69
70
71
# 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 = lint,py39,py310,py311
skip_missing_interpreters =
true
[flake8]
max-line-length = 80
select = C,E,F,W,B,B950
ignore = E203, E501, W503
[testenv]
deps = -rtest-requirements.txt
-rrequirements.txt
commands =
pytest tests/unit tests/integration tests/acceptance \
--cov cromshell \
--cov-report term-missing \
--cov-report html \
--cov-report xml \
{posargs}
setenv =
# Used by __get_config_dir() in cromshellconfig.py to set cromshell hidden dir
CROMSHELL_CONFIG = /tmp/
[testenv:unit]
deps = -rtest-requirements.txt
-rrequirements.txt
commands =
pytest tests/unit {posargs}
[testenv:integration]
deps = -rtest-requirements.txt
-rrequirements.txt
commands =
pytest tests/integration {posargs}
[testenv:acceptance]
deps = -rtest-requirements.txt
-rrequirements.txt
commands =
pytest tests/acceptance {posargs}
[testenv:lint]
deps =
pylint
black
flake8
commands =
black --check --diff --target-version py38 src tests
isort --check-only --profile black --diff tests src
flake8 src tests
pylint --exit-zero src
[testenv:lint-edit]
deps =
pylint
black
flake8
commands =
black --target-version py38 src tests
isort --profile black tests src
flake8 src tests
pylint --exit-zero src