2020-02-07 04:06:57 +00:00
|
|
|
[tox]
|
2020-07-24 03:33:57 +00:00
|
|
|
envlist = flake8, black, py27, py3
|
2020-02-07 04:06:57 +00:00
|
|
|
|
2020-07-24 03:33:57 +00:00
|
|
|
[testenv:flake8]
|
2020-02-07 04:06:57 +00:00
|
|
|
deps =
|
|
|
|
flake8
|
2020-05-26 09:49:40 +00:00
|
|
|
whitelist_externals = sh
|
2020-02-07 04:06:57 +00:00
|
|
|
commands =
|
2020-05-26 09:49:40 +00:00
|
|
|
sh -c "flake8 pungi pungi_utils setup.py tests/*py"
|
2020-02-07 04:06:57 +00:00
|
|
|
|
2020-07-24 03:33:57 +00:00
|
|
|
[testenv:black]
|
|
|
|
basepython = python3
|
|
|
|
whitelist_externals = sh
|
2020-02-07 04:06:57 +00:00
|
|
|
deps =
|
2020-07-24 03:33:57 +00:00
|
|
|
{[testenv:flake8]deps}
|
2020-02-07 04:06:57 +00:00
|
|
|
black
|
|
|
|
commands =
|
2020-07-24 03:33:57 +00:00
|
|
|
{[testenv:flake8]commands}
|
2020-03-05 08:51:06 +00:00
|
|
|
black --check --diff pungi pungi_utils setup.py tests --exclude tests/_composes
|
2020-02-07 04:06:57 +00:00
|
|
|
|
2020-07-24 03:33:57 +00:00
|
|
|
[testenv:py27]
|
|
|
|
sitepackages = true
|
|
|
|
deps =
|
2020-08-07 03:55:14 +00:00
|
|
|
-rrequirements.txt
|
|
|
|
-rtest-requirements.txt
|
2020-07-24 03:33:57 +00:00
|
|
|
whitelist_externals =
|
|
|
|
sh
|
|
|
|
make
|
|
|
|
coverage
|
|
|
|
commands =
|
|
|
|
sh -c 'find . -name "*.pyc" -exec rm -f \{\} +'
|
2020-07-28 01:23:53 +00:00
|
|
|
pip install --force-reinstall pytest mock
|
2020-07-24 03:33:57 +00:00
|
|
|
make test-coverage
|
|
|
|
coverage xml
|
|
|
|
|
|
|
|
[testenv:py3]
|
|
|
|
sitepackages = true
|
|
|
|
deps =
|
2020-08-07 03:55:14 +00:00
|
|
|
-rrequirements.txt
|
|
|
|
-rtest-requirements.txt
|
2020-07-24 03:33:57 +00:00
|
|
|
whitelist_externals =
|
|
|
|
sh
|
|
|
|
commands =
|
|
|
|
sh -c 'find . -name "__pycache__" -exec rm -rf \{\} +'
|
2020-07-28 01:23:53 +00:00
|
|
|
pip install --force-reinstall pytest mock
|
2021-08-12 14:35:47 +00:00
|
|
|
pytest {posargs}
|
2020-07-24 03:33:57 +00:00
|
|
|
|
2016-02-23 12:03:11 +00:00
|
|
|
[flake8]
|
2020-02-07 04:06:57 +00:00
|
|
|
exclude = doc/*,*.pyc,*.py~,*.in,*.spec,*.sh,*.rst
|
2016-02-23 12:03:11 +00:00
|
|
|
filename = *.py
|
2020-02-03 03:50:06 +00:00
|
|
|
max-line-length = 88
|
2017-01-11 13:37:16 +00:00
|
|
|
|
|
|
|
# E402: module level import not at top of file
|
|
|
|
# H301: one import per line
|
|
|
|
# H306: imports not in alphabetical order
|
2017-06-14 11:21:31 +00:00
|
|
|
# E226: missing whitespace around arithmetic operator
|
|
|
|
# W503: line break occured before a binary operator
|
2020-01-22 10:02:22 +00:00
|
|
|
# E203: whitespace before ':'
|
2020-02-03 03:50:06 +00:00
|
|
|
ignore = E402,H301,H306,E226,W503,E203
|
2016-02-23 12:03:11 +00:00
|
|
|
|
2020-07-28 01:23:53 +00:00
|
|
|
[pytest]
|
|
|
|
addopts = --ignore=tests/_composes
|