-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
65 lines (57 loc) · 1.7 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
# content of: tox.ini , put in same dir as setup.py
[tox]
envlist = format,lint,pytest
# envlist = format,flake8,pytest # Use this when COMPPROT-2993 is solved. It should be used by devs before commit.
[testenv]
basepython = python3
deps = -rrequirements.txt
envdir = {toxworkdir}/run
skip_install = true
[testenv:black]
envdir = {toxworkdir}/black
deps = black==22.3.0
commands =
{envpython} -m black {posargs}
[testenv:flake8]
envdir = {toxworkdir}/flake
deps = flake8==3.9.2
commands =
{envpython} -m flake8 {posargs}
[testenv:pytest]
pip_pre = true
skip_install = false
envdir = {toxworkdir}/test
deps =
{[testenv]deps}
pytest==6.2.5
pytest-cov==2.8.1
pytest-custom-exit-code==0.3.0
extras = tests
commands =
{envpython} -m pytest -s --junitxml=test_result_junit.xml --cov=spec2psm --cov-report=term --cov-report=xml --cov-branch --suppress-no-test-exit-code {posargs}
[testenv:format]
envdir = {[testenv:black]envdir}
deps = {[testenv:black]deps}
commands = {[testenv:black]commands} . --exclude=/(\.direnv|\.eggs|\.git|\.hg|\.mypy_cache|\.nox|\.tox|\.venv|venv|\.svn|_build|buck-out|build|dist|__pypackages__)/ --check
[testenv:lint]
envdir = {[testenv:flake8]envdir}
deps =
{[testenv:flake8]deps}
importlib-metadata==4.13.0
commands = {[testenv:flake8]commands} --format=pylint --exit-zero --output-file=flake8.out --tee
[testenv:test]
pip_pre = true
skip_install = false
envdir = {[testenv:pytest]envdir}
deps = {[testenv:pytest]deps}
extras = {[testenv:pytest]extras}
commands = {[testenv:pytest]commands} tests/
[testenv:build-dist]
skipsdist = True
skip_install = True
deps =
-U
setuptools>=42
wheel
setuptools_scm[toml]>=3.4
commands = python setup.py sdist